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

Parents
  • 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

Reply
  • 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

Children
  • 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

  • So does the application still stop on 0x0A60?

    Yes.

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

    Yes. Break at 0x0A60 first. After pressing F5, break at 0x0A80. Then pressing F5 again, the system reboot.

    Does that means the system cannot reboot to bootloader?

  • So it never hits any of the breakpoints in app_error_fault_handler() or HardFault_c_handler()?

    Due to holiday season in Norway, we are really low on capacity. Is there any way for me to reproduce this issue? If so, can you give me a detailed description, and zip your project so I can easily reproduce it, preferably with an unmodified bootloader from the SDK and your project. Perhaps I can see where the hardfault handler is pointing to.

    For your sake, I will be looking at the SP (stack pointer) and see what functions in the .map file it points to in 0xa60 and 0xa80, so if you want to give this a go, you can try this as well.

    Best regards,

    Edvin

  • Hi Edwin,

    Thanks.

    I have already attached my project in the 1st thread and you can find it there.

    I just perform the DFU using the iOS nordic APP. After I press "start",the problem occurs.

Related