Hi, consider this PIO code on pico2:
It's works perfectly fine and I see side set GPIO (led) light up when ALE pin is low, but if I add
this line before the .wrap
resulting the very same codeState machine stalls for no reason, I do not see any link between stalling the sate machine and setting scratch register Y to 1.
Please help, I don't understand why it stalls when you set the scratch register that even not get used anywhere?
Code:
.program memory.side_set 1 opt.wrap_targetaddress_latch: wait 1 gpio 26 side 0 ; wait ALE HIGH wait 0 gpio 26 side 1 ; wait ALE LOW mov isr, null ; reset isr in pins, 23 ; read address in null, 12 ; shift right 12bits.wrapthis line before the .wrap
Code:
mov y, ~nullresulting the very same code
Code:
.program memory.side_set 1 opt.wrap_targetaddress_latch: wait 1 gpio 26 side 0 ; wait ALE HIGH wait 0 gpio 26 side 1 ; wait ALE LOW mov isr, null ; reset isr in pins, 23 ; read address in null, 12 ; shift right 12bits mov y, ~null ; THIS LINE ADDED and stalls the state machine.wrapPlease help, I don't understand why it stalls when you set the scratch register that even not get used anywhere?
Statistics: Posted by sh71rlic — Sat Oct 12, 2024 9:09 am