Weird "Uncaught exception in IRQ callback handler" when using 32bit values via PIO's FIFO #16213
Replies: 5 comments
-
Occurs with MicroPython 1.22, 1.23, 1.24 and a recent (self built) 1.25. This script can run standalone on stock hardware, and if the line is changed to set upper bits will cause issue: |
Beta Was this translation helpful? Give feedback.
-
Just for clarity, the ISR and the FIFO access work correctly if the MSBs are NOT set. The correct value is pulled from the FIFO and put into the global variable I do have following, but unsure how to access further information on the exception.
|
Beta Was this translation helpful? Give feedback.
-
Maybe this... Unsigned to Signed?
|
Beta Was this translation helpful? Give feedback.
-
Simplified example, actually gives more information (presumably as it's not threaded).
In the working case (MSB not set) I get:
|
Beta Was this translation helpful? Give feedback.
-
reported as bug: |
Beta Was this translation helpful? Give feedback.
-
I am using a 'raw' register to hold 32bit of information. When this is accessed in my IRQ handler I get an exception.
The IRQ code reads the value from a FIFO, and if the upper 2 bits are set I get the error. The value is being passed to PIO block's out FIFO and returned via in FIFO.
Trigger can be manually set by forcing the bits...
The PIO block is just returning what it is sent... I am using this to keep track of which frame is transiting through the various FIFO's on multiple PIO blocks.
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions