Can one run out of PIO? #2859
-
I think this is a stupid question, but could not find the answer anywhere… Several protocols can be emulated using PIOs state machines. For instance Sorry for the silly question… |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Yes, you can run out. You get 8 on the RP2040, 12 on the RP2350. The core uses 1 for a cycle counter if you run FreeRTOS, but OTW they're only allocated when your app uses one. When you |
Beta Was this translation helpful? Give feedback.
Yes, you can run out. You get 8 on the RP2040, 12 on the RP2350. The core uses 1 for a cycle counter if you run FreeRTOS, but OTW they're only allocated when your app uses one.
When you
begin
a PIO-SM-using device (SoftwareSPI, Tone, Servo, etc.) it'll allocate its needed SMs and you can't deallocate them while the library is running. For some when youend
it may free the SM, but things like PIO instruction memory will still be allocated and not useful for other libraries. (endTransaction
is not the same and doesn't affect PIO SM usage, just the protocol).