Hi,
I am using nrf52840 as periphiral. How can I enable low power mode to save battery?
Thanks!
Hi,
I am using nrf52840 as periphiral. How can I enable low power mode to save battery?
Thanks!
Hi,
There are two types of low power modes.
1. System on sleep
This can be achieved by calling the following functions
/* Wait for an event */
__WFE();
/* Clear the event register */
__SEV();
__WFE();
2. System off sleep
nrf_power_system_off(); -- You can call this, when there is no presence of soft-device in your code.
sd_power_system_off(); -- This would be the system off sleep when there is presence of softdevice.
To call these two functions, you have to add nrf_pwr_mgmt.c file and also power management module has to be enabled in sdk_config.h
Please do remember, In system off sleep mode, RTC also won't work. To wake up the system, it is required to do any interrupts using peripherals. My suggestion is to un-initialize all the peripherals and timers then reduce the debug prints and also stop advertising and scanning if BLE module is there.
Regards,
Sudharsan
Hi,
There are two types of low power modes.
1. System on sleep
This can be achieved by calling the following functions
/* Wait for an event */
__WFE();
/* Clear the event register */
__SEV();
__WFE();
2. System off sleep
nrf_power_system_off(); -- You can call this, when there is no presence of soft-device in your code.
sd_power_system_off(); -- This would be the system off sleep when there is presence of softdevice.
To call these two functions, you have to add nrf_pwr_mgmt.c file and also power management module has to be enabled in sdk_config.h
Please do remember, In system off sleep mode, RTC also won't work. To wake up the system, it is required to do any interrupts using peripherals. My suggestion is to un-initialize all the peripherals and timers then reduce the debug prints and also stop advertising and scanning if BLE module is there.
Regards,
Sudharsan
Thanks for the answer, Sudharsan. I would also recommend that you read through this blog post by Jeff here: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf52-designs. I provides some general guidelines on how you can power optimize you design