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

General • Does my board have a broken PIO or is my code wrong?

$
0
0
Really struggling debugging a PIO program on a Pico W - program works great in an emulator, but outputs.. bogus when I run it on my actual Pico board. To try and isolate the problem, I narrowed it down to the following two programs, with FIFO autopush enabled at 32 and RX joining.

Code:

.wrap_targetset x 1in x 32 .wrap

Which - as I expect - emits an infinite stream on the rx FIFO of `0b0000_0000_0000_0001`.

If I swap `x` for `y`, however, the program stops working. Eg the following PIO program does not give the same output:

Code:

.wrap_targetset y 1in y 32 .wrap
This program emits an infinite stream of zeroes, rather than an infinite stream of ones (eg. `0b0000_0000_0000_0001`).

I tried to "kick it" by force-executing an instruction on the PIO to set the register to 1, and after that and re-flashing the program started working correctly.

This makes me feel super concerned that I can't trust the PIO.. is this a symptom of some sort of hardware problem? I'm concerned this would start happening when field deploying these.. has anyone else experienced unreliability / stickiness on the PIO registers? Is there some configuration I may have messed up?

Statistics: Posted by jjdh — Tue Jun 10, 2025 6:06 pm — Replies 3 — Views 98



Viewing all articles
Browse latest Browse all 7503

Trending Articles