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

nRF52832 does not recovers after hardfault but recovers only after power cycle.

Hi, 
I'm working on nRF52832 based device with s112 and SDK15 based bootloader and app built with gcc.
I have modified default Nordic bootloader to start DFU transport on hardfault happened in App. During App development i've made mistake and got hardfault when loaded the app and issued CLI test command to trigger my code piece execution. As expected bootloader started DFU transport. But after inactivity timeout it restarted again and again. No App was loaded until I power cycled device (removed power for a few seconds and supplied again).
My suggestion is that my App code in some way corrupted RAM or volatile registers contents that made impossible for bootloader to start the app. Aftter i power cycled device the RAM contents became erased and bootloader successfully loaded app. 

Any suggestions what RAM regions are sensitive and can lead to such behavior? Should bootloader start code initialize all RAM and registers? (except .noinit ones)
Thanks

  • Hi Valerii, 

    It sounds like the bootloader keeps re-entering DFU mode after softresets, but is successfully booting the app after a power cycle. So I'd suggest to debug the bootloader to find out why the "dfu enter check" returns true after soft reset, but not after a power cycle. It's in nrf_bootloader.c:dfu_enter_check(), bootloader enters dfu mode if this function returns true. 

    -Amanda H.

Related