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

SDK • PIO state machine stall, bug?

$
0
0
Hi, consider this PIO code on pico2:

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.wrap
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

Code:

mov y, ~null

resulting 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.wrap
State 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?

Statistics: Posted by sh71rlic — Sat Oct 12, 2024 9:09 am



Viewing all articles
Browse latest Browse all 8037

Trending Articles