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

EV board reset after implemented buttonless DFU feature to hrs_freertos example

Hi,

I added the feature of the 'buttonless dfu' to the 'hrs freertos' using the SDK v15.3.0.

After programmed the built image to the EV board PCA10040, it could run normally.

However, when I started the DFU process using 'nRF Connect' APP, the EV board reset itself.

The attached zip file is my changes made.

Thanks!

ble_app_hrs_freertos_dfu_evboard.zip

  • Hi Terry

    Have you attempted to get the context of the reset? the reset can only happen to a call to NVIC_SystemReset and you can check in your code where you have these and put a breakpoint there. Run your code in debug mode and to get some context on why this reset happens. If you can get the context of the reset, I would try to assist you further. 

  • Hi Susheel,

    I have setup all breakpoints where NVIC_SystemReset is calling.

    However, this problem occurred without triggering any breakpoint.

    Please find the attached screen capture.

  • 0XA60 is the Hardfault handler in the MBR. Please do the following

    1. Put a breakpoint in the app_error_fault_handler in your project and also one brekpoint in HardFault_c_handler
    2. Run your program again in the debug mode so that you have a hit at the breakpoint and the program pauses at 0xA60 (like the snapshot you provided)
    3. Press F5 or continue the program from this point so that the MBR calls the softdevice hardfault handler and that in turn calls your application HardFault_c_handler.
    4. you should get the context of the hardfault or the softdevice assert from there to be able diagnose the problem. 

    /Susheel

  • Hi Susheel,

    After I setup the breakpoints on app_error_fault_handler() and HardFault_c_handler(), the FW could not be triggered by those breakpoints.

    Then, I checked the .map file and then setup a breakpoint on ble_evt_handler(). The FW stopped when I started the DFU process on the mobile phone.

    Please find the captured screens.

    Then, press 'Step Into'

  • Terry said:
    After I setup the breakpoints on app_error_fault_handler() and HardFault_c_handler(), the FW could not be triggered by those breakpoints.

     So does the application still stop on 0x0A60?

    The ble_evt_handler() is likely to be called when you start performing a DFU process. It doesn't mean that the issue is related to the first ble event. 

    Does it still stop on 0x0A60 after you place those breakpoints? If so, press "continue" (F5) and not "Step into". What happens then?

    BR,

    Edvin

Related