Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

WakeUp from sleep mode

Hi,

we try to get the NRF52840 to sleep and then wake up from an GPIO interrupt.

We try it in debug mode which should give a emulated sleep mode. So we stop all processing and at a while(1) loop after calling sd_power_system_off.

The wakeup pin is configured as followed:

	nrf_gpio_cfg_input(IMU_INT2, NRF_GPIO_PIN_NOPULL);
	nrf_gpio_cfg_sense_set(IMU_INT2, NRF_GPIO_PIN_SENSE_HIGH);

Prior to setting the nrf to sleep the interrupt is firing and working as expected. And I can see the interrupt going high and low again when the nrf should be in sleep

but it does not produce a reset. Some other information the device is running with USB powered and usb_handling enabled and debugger disconnected.

I've already tried to uncomment the USB stuff and run it without USB but still no progress.
Help is appreciated ;-).

Kind regards,

C.W.

PS: SDK is 17.0.0

Parents
  • Hi again

    Please check out the System OFF mode section in the nRF52832 product specification. It states that "before entering system OFF mode, all ongoing EasyDMA transactions need to have completed. Advertising normally does not carry EasyDMA, but I think that when you're in debug mode the emulated system OFF mode will need you to disable and wait for a moment before emulating sleep.

    Either way, when going to deep sleep, the logical path would be to disable advertising either way. In release mode I don't think you should need to stop advertising before calling sd_power_system_off() as long as there are no EasyDMA transactions running.

    Best regards,

    Simon

Reply
  • Hi again

    Please check out the System OFF mode section in the nRF52832 product specification. It states that "before entering system OFF mode, all ongoing EasyDMA transactions need to have completed. Advertising normally does not carry EasyDMA, but I think that when you're in debug mode the emulated system OFF mode will need you to disable and wait for a moment before emulating sleep.

    Either way, when going to deep sleep, the logical path would be to disable advertising either way. In release mode I don't think you should need to stop advertising before calling sd_power_system_off() as long as there are no EasyDMA transactions running.

    Best regards,

    Simon

Children
Related