ports/rp2: "Uncaught exception in IRQ callback handler" when retrieving PIO FIFO value with MSB set
Port, board and/or hardware
Official Pico w/rp2040
MicroPython version
MicroPython v1.24.0 on 2024-10-25; Raspberry Pi Pico with RP2040
Reproduction
uncaught_exception_test.py.txt
Expected behaviour
MPY: soft reboot
0x12345678
0x12345678
Observed behaviour
MPY: soft reboot
Uncaught exception in IRQ callback handler
Traceback (most recent call last):
File "<stdin>", line 33, in irq_handler
MemoryError: memory allocation failed, heap is locked
0x00000000
0x00000000
Additional Information
Some discussion/commentary here:
https://github.com/micropython/micropython/blob/master/ports/rp2/rp2_pio.c#L820
Code of Conduct
Yes, I agree
Raspberry Pi Pico _thread OSError: TinyUSB callback can't recurse
Port, board and/or hardware
Raspberry Pi Pico
MicroPython version
MicroPython v1.23.0 on 2024-06-02; Raspberry Pi Pico with RP2040
Reproduction
import time
import _thread
def test(name):
... print(1)
... time.sleep(1)
...
...
...
_thread.start_new_thread(test,('name',))
2
1
FATAL: uncaught exception 200127f0
OSError: TinyUSB callback can't recurse
Expected behaviour
I found that this problem does not exist in version 1.22.2
Observed behaviour
My previous program didn't work after I updated the firmware. I was sure the program would work, so I changed the firmware to 1.22.2 and it worked.I found when the "while True" in "_thread.start_new_thread" , this problem must occur. I guess it is caused by USB-related changes.
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree