Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 15607

MicroPython • Re: Experiments in chaining DMA to PIO - strange error and room for improvement?

$
0
0
Q1. If the first version of the PIO program is fine, why does the second one raise a PIOASMError: delay too large error (on the line with the comment)?
There is a catch with PIO with wait/sideset 5 bits.
If you don't specify .side to every instruction, one bit of those five will be used as 'optional sideset'.
Then using 3 bits for side pins + 1 'optional sideset' leaves you only one bit for wait.
out(pins, 8).side(1) [3]# Now I'm only allowed a single bit of wait
nop() [3]
out(pins, 8).side(2) [3]
nop() [3]
out(pins, 8).side(4) [3]
nop() [3]
P.S. Try putting .side() also to nops, it should work.

Statistics: Posted by gmx — Thu Sep 11, 2025 4:43 pm



Viewing all articles
Browse latest Browse all 15607

Latest Images

Trending Articles



Latest Images