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

Bootloader app_start_timer cause HardFault

Hi,

Im trying to modify secure_bootloader demo in SDK_12.3, to use timers. I modify nerf_dfu.c file in libraries/bootloaders catalog. I want to achieve bootloader wait for 30s for update next start application normally if app is valid. 

After call app_start_timer() function bootloader hang on hard fault. I'm using PCA10028 development board and own device and on both it's not working. Could You give me some advices what I am doing wrong?

Parents
  • I am not sure what you may have changed for lto to break the build, there are many ways for the optimization to break a build if you have a small issue with the implementation. In SDK 14.0.0 we introduced the "nrf_dfu_inactivity_timeout_timer" which you might want to take a look at to see if you are doing something differently. This timer seems to work as intended also when lto is enabled, so if you can find a difference or copy our implementation it should work as intended.

    Another alternative is to run without link time optimization. The SDK bootloader has it disabled by default.

    Best regards,
    Rune Holmgren

Reply
  • I am not sure what you may have changed for lto to break the build, there are many ways for the optimization to break a build if you have a small issue with the implementation. In SDK 14.0.0 we introduced the "nrf_dfu_inactivity_timeout_timer" which you might want to take a look at to see if you are doing something differently. This timer seems to work as intended also when lto is enabled, so if you can find a difference or copy our implementation it should work as intended.

    Another alternative is to run without link time optimization. The SDK bootloader has it disabled by default.

    Best regards,
    Rune Holmgren

Children
Related