exiting a state machine #9436
Replies: 2 comments 6 replies
-
When you say
the state machine runs in the background independently of the main program. The main program will only pause waiting for input from the SM if you write it that way. Likewise you can write the SM code so that it waits for an external event such as a pin change. All this is under your control :) |
Beta Was this translation helpful? Give feedback.
-
To halt the SM from inside programmatically you may use the wait instruction. You may wait for an IRQ e.g. in the range 4..7 which is just a flag. Alternatively you may jump in place like
which is also only one instruction (the label does not count).
which would let it jump to instruction number 3. This would work even if the SM was still active in the halt loop. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am implementing a JTAG state machine by means of PIO in micropython. From my limited understanding of PIO, I understand that the state machine wraps back to its initial state and continues indefinitely. However, I would like the state machine to exit and return to the main program once it has completed one loop of the state machine. Is there any systematic way of doing so? Thanks for the help! :)
Beta Was this translation helpful? Give feedback.
All reactions