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

Secure bootloader timeout not working on S132 15.3 SDK with logging disabled

I am running into a strange issue. I want the bootloader to start automatically when I power on the device and then start the application if there is no activity after 30 seconds. 

To do that I've done the following changes:
1. Change NRF_BL_DFU_INACTIVITY_TIMEOUT_MS to 30000 in sdk config
2. Change dfu_enter_check in nrf_bootloader.c to always return true
3. Change inactivity_timeout in nrf_bootloader.c to do "nrf_bootloader_app_start();" instead of "bootloader_reset(true);" if the app is valid. but for tests i also made it just jump in without the check 

But it never launches the app and I'm not sure the timer is even hit or expires. 

Now here is the weird part, with the pca10040_ble_debug project, this all works as expected. I then made the change where I enabled NRF_LOGGING_ENABLED with Segger RTT in the non-debug version. I had to also expand the flash size for these changes. When logging is enabled, then it all works as expected again!

I should add that I checked the debug version's public key to match my non-debug public key, so they are the same and the app I'm loading over OTA works on both versions. If I remove my forced true from dfu_enter_check in the non-debug version, it launches the app just fine.

Why is this happening? What is special about logging that would make this timeout work but not without it? I'm stuck at this point but would prefer not to release a larger bootloader with logging if I don't have to. I can't debug the version that's failing, and the debug version is working fine Disappointed

Thank you in advance for any suggestions.

Parents Reply Children
No Data
Related