This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Sleep on power mode with only one interrupt for waking up

Hi Folks,

I am currently implementing a power down routine onto the nRF52840 SoC and I have some questions regarding the right way to configure to system On sleep mode.

During Run mode, I have many interrupts configured like UART, SPI, I2C,  BLE (via Softdevice) and I was wondering how to prepare the sleep mode before powering down (with nrf_pwr_mgmt_run() for example) in order to wake up only with a GPIO event. (thanks to GPIOTE if I have well understood )

Do I need to manually disable all unused interrupt (UART/SPI/I2C and BLE) before going to sleep mode ? Is there a fast way to configure it without disabling / enabling each time interrupt ?

The last question : Could you please provide me some code samples demonstrating this particular kind of use?

The best.

Sebastien 

Parents
  • Hi Sebastien

    We suggest powering down by disabling/uninitializing any peripherals you won't use while the system is sleeping, and calling nrf_pwr_mgmt_run() afterwards to set a wake up method and go to sleep. If you don't want to disable them you can wait for all buffers to be cleared like the idle_state_handle() function does in most of our SDK examples which then calls the nrf_pwr_mgmt_run() function to go to sleep.

    If your device is going to sleep for greater amounts of time I would rather suggest looking at the system OFF mode though, as that should be a lot more efficient in terms of current consumption.

    Best regards,

    Simon

Reply
  • Hi Sebastien

    We suggest powering down by disabling/uninitializing any peripherals you won't use while the system is sleeping, and calling nrf_pwr_mgmt_run() afterwards to set a wake up method and go to sleep. If you don't want to disable them you can wait for all buffers to be cleared like the idle_state_handle() function does in most of our SDK examples which then calls the nrf_pwr_mgmt_run() function to go to sleep.

    If your device is going to sleep for greater amounts of time I would rather suggest looking at the system OFF mode though, as that should be a lot more efficient in terms of current consumption.

    Best regards,

    Simon

Children
Related