← index #4716PR #13367
Off-topic · high · value 1.201
QUERY · ISSUE

H743ZI sleep modes

openby orelmiopened 2019-04-23updated 2019-08-27
port-stm32

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

CANDIDATE · PULL REQUEST

nrf/modules/machine: Implement deepsleep()

openby cwaltheropened 2024-01-05updated 2025-10-20
port-nrf

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).

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied