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

Bug in nrf_bootloader

Hello, We have found a bug in nrf_bootloader that can prevent the application from starting up properly.

In nrf_bootloader_app_start.c, the nrf_bootloader_app_start() function attempts to disable all individual interrupts, without globally disabling interrupts. It does this by setting all of the bits of the NVIC's ICER register.

The problem is that the SysTick interrupt isn't controlled through the NVIC, so it doesn't get disabled. If the bootloader uses the SysTick interrupt, then as soon as the application enables interrupts globally a SysTick interrupt will occur and the application will probably hang.

The fix is to set SysTick->CTRL to 0 after setting all of the NVIC ICER bits in nrf_bootloader_app_start(). I'm not sure if the Cortex-M4 has any other interrupts that also aren't controlled through NVIC that would have a similar problem.

Parents Reply Children
No Data
Related