Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Buttonless DFU function with NRF_PWR_MGMT_CONFIG_AUTO_SHUTDOWN_RETRY enabled

Hi,

I'm working on adding the buttonless DFU function to my application. It works fine when I disable NRF_PWR_MGMT_CONFIG_AUTO_SHUTDOWN_RETRY in sdk_config.h. However, once this macro is enabled, the application gets an error [NRF_ERROR_NO_MEM] from the function nrf_pwr_mgmt_init() during the initialization. Deep into this issue, the error comes from line 318 in nrf_pwr_mgmt.c (return app_timer_start(m_pwr_mgmt_timer, APP_TIMER_TICKS(1000), NULL);). How can I fix this issue?

I'm using SDK 17.0.2 and chipset nRF52840.

Parents
  • This issue is solved. It's a stupid mistake that I put nrf_pwr_mgmt_init() ahead of app_timer_init() in the initialization code. Once NRF_PWR_MGMT_CONFIG_AUTO_SHUTDOWN_RETRY is enabled, the PWR_MGMT module needs to create and start its timer by using the APP_TIMER module which is not initialized yet. I change the order of these two function and then the error disappears. Please ignore this subject. Thanks.

Reply
  • This issue is solved. It's a stupid mistake that I put nrf_pwr_mgmt_init() ahead of app_timer_init() in the initialization code. Once NRF_PWR_MGMT_CONFIG_AUTO_SHUTDOWN_RETRY is enabled, the PWR_MGMT module needs to create and start its timer by using the APP_TIMER module which is not initialized yet. I change the order of these two function and then the error disappears. Please ignore this subject. Thanks.

Children
No Data
Related