-
Notifications
You must be signed in to change notification settings - Fork 189
Description
This is an issue in lv_micropython, but since Issues are not enabled in that repository, I am reporting it here.
In my project, I connected a button to GPIO20 with an external pull-up resistor and used an interrupt to read the button state. Recently, I migrated from the RP2040 to the RP2350 for more RAM. However, I found that pressing the button causes the device to hang.
After some testing, I discovered that the issue only occurs after importing lvgl. The problem can be reproduced with the following code:
import lvgl as lv # System hangs only if this line is included
from machine import Pin
def pin_irq(pin):
print(pin.value())
p = Pin(20, Pin.IN)
p.irq(handler=pin_irq, trigger=Pin.IRQ_FALLING | Pin.IRQ_RISING)
Issue behavior:
After pressing the button, a "0" is printed, but any subsequent button operations do not trigger a response. Using Thonny's "Stop/Restart Backend" also fails to restore the device to normal operation. The device can only be recovered by performing a hard reset via the RST button.
If the import lvgl as lv line is removed, the button operations correctly print the pin level.
Additional information:
The issue seems to occur only on the RP2350 and works normally on the RP2040.
Board model: YD-RP2350-Lite