QUERY · ISSUE
pyboard - deepsleep wake pins
port-stm32
I have just switched to pyboard for a project which has been on the esp32 and I need to be able to wake from deep sleep by either time or a pin edge.
https://github.com/micropython/micropython/blob/master/docs/library/machine.Pin.rst
https://docs.micropython.org/en/latest/pyboard/library/machine.Pin.html
These pages indicate that the syntax for enabling a wake-up pin is:
import machine as mc
door = mc.Pin('X1',mc.Pin.IN)
door.irq(handler=None, trigger=(mc.Pin.IRQ_FALLING | mc.Pin.IRQ_RISING),wake=mc.DEEPSLEEP)
However this results in an error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'DEEPSLEEP'
What's the solution ?
CANDIDATE · ISSUE
[STM32WB] sleep or deepsleep wakeup on pin irq
Hi,
is there any way to wake up from sleep or even better deepsleep using the pyb.Switch pin (A10)? or other solution for this?
Regards,
D.