alif: implement wake up sources for machine.lightsleep()#19210
alif: implement wake up sources for machine.lightsleep()#19210dpgeorge wants to merge 3 commits into
machine.lightsleep()#19210Conversation
Passing in a millisecond timeout argument to `machine.lightslep()` will configure the LPTIMER to wake the system. Signed-off-by: Damien George <damien@micropython.org>
This allows the GPIO IRQ to be enabled even if a Python `Pin.irq()` is not configured for that pin. Signed-off-by: Damien George <damien@micropython.org>
Configure the P15_7 GPIO IRQ on the user button input so that the button can wake the device from `machine.lightsleep()`. Signed-off-by: Damien George <damien@micropython.org>
|
@kwagyeman @iabdalkader this should get I also tested waking via a message sent from HE to HP. That works (it wakes HP from |
|
@dpgeorge what do you mean by first create the endpoint on the HP side. Do you mean that at least one message has to be received first before the HP can sleep? Please let me know what needs to be changed in the example I posted on the bug report. |
I'm not sure exactly how your code works when communicating with the second core (it's hidden behind the |
Summary
This PR implements on alif the following wake-up sources for
machine.lightsleep():machine.lightsleep(timeout_ms)Addresses #19190.
Testing
Tested on OPENMV_AE3:
machine.lightsleep(2_000)andmachine.lightsleep(15_000), the device wakes after the specified timemachine.lightsleep(), then pressing the user button wakes the deviceGenerative AI
I did not use generative AI tools when creating this PR.