H743ZI sleep modes
Hello,
I see that function machine_deepsleep has a TODO for STM32H7.
Please could you help me to implement the TODO ? I should do that but i need main guide lines.
Thanks
Aurélien
nrf/modules/machine: Implement deepsleep()
Replace the previous dummy implementation of machine.deepsleep() with one that invokes the nRF's deep sleep state System OFF. The argument is ignored, nRF microcontrollers are incapable of waking on a timer as all clocks are off in the deep sleep state.
Pins are configured as wake sources using an additional argument sense to the machine.Pin constructor. This choice is up for debate, it seemed appropriate because it internally is a matter of GPIO configuration. I also considered using the unused wake argument to Pin.irq(), but rejected that because the configuration has nothing to do with IRQs. Another possibility would be a special function in the nrf module, akin to esp32.wake_on_ext0().
machine.reset_cause() returns the newly added DEEPSLEEP_RESET, like on other ports – the previous mapping to PWRON_RESET seemed wrong.
I am unsure where to document this, as there is no port-specific documentation for the nrf port. Should I add a Quick reference for the nRF51/52 section just for this?
Tested on nRF52832 (DS-D6) and nRF52840 (ItsyBitsy).