Correct. I'm saying you need the unconditional jmp to save state or else you get fall through. In other words, you don't need your wrap but you need jmp to keep your state machine as intended. I think hooking up a button and viewing output waveforms with different code could help. I still think it goes into your alternating cycle because we're misunderstanding PIO.Thank you very much for your answers and tests!
@gmx:
I'll be able to run some more tests in a few days, I've tested what I have reported both on 2040 and 2350, PIO synchronizers left to their default, with same results.
Removing the "jmp low side 0b11" line or replacing it with "nop side 0b11" would systematically result in the outputs looping high/low, independently of the input state, as if the "jmp pin" conditions were ignored. Doesn't matter if the input was kept high, low or toggled at 1Hz.
What you are reporting is very interesting, thank you very much!
@breaker: as gmx said, the equivalence I'm referring to is between the unconditional jmp and .wrap, thanks for your interest though
Statistics: Posted by breaker — Wed Jan 07, 2026 2:57 pm