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

MicroPython • Re: PIOASM error message "delay too large" when "nop() .side(0) [7]" followed by "nop() [8]"

$
0
0
Moreover:
PIO: SM0_PINCTRL
SIDESET_COUNT: The number of MSBs of the Delay/Side-set instruction field
which are used for side-set. Inclusive of the enable bit, if present. Minimum of
0 (all delay bits, no side-set) and maximum of 5 (all side-set, no delay).
So, it depends how MicroPython is configuring PIO https://docs.micropython.org/en/latest/library/rp2.html
.delay(value)
This is a modifier which can be applied to any instruction, and specifies how many cycles to delay for after the instruction executes.
value: cycles to delay, 0-31 (maximum value reduced if side-set pins are used)
but found viewtopic.php?t=338082 explaining that the maximum delay time is 7 when sideset is used.
Yep, actually for 1 bit side set, there is another bit used for enable side-set, otherwise every instruction will do a side-set (optional).
There are four things to configure when using side-set:
• The number of MSBs of the Delay/side-set field to use for side-set rather than delay. This is configured by
PINCTRL_SIDESET_COUNT. If this is set to 5, delay cycles are not available. If set to 0, no side-set will take place.
• Whether to use the most significant of these bits as an enable. Side-set takes place on instructions where the
enable is high. If there is no enable bit, every instruction on that state machine will perform a side-set, if
SIDESET_COUNT is nonzero. This is configured by EXECCTRL_SIDE_EN.

• The GPIO number to map the least-significant side-set bit to. Configured by PINCTRL_SIDESET_BASE.
• Whether side-set writes to GPIO levels or GPIO directions. Configured by EXECCTRL_SIDE_PINDIR

Statistics: Posted by gmx — Sat Jan 18, 2025 12:43 am



Viewing all articles
Browse latest Browse all 5714

Trending Articles