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

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

  • Hello,

    Sorry, I didn't notice that it was attached.

    So I tested your project (compiled with SES) in SDK15.3.0 with an unmodified bootloader, running on a DK. I was not able to reproduce the issue. 

    Can you try to unzip the project that you attached in the path  "test\251837" (create this folder) in the examples folder in the SDK, and compile it.

    Then generate your own private.key and dfu_pulbic_key.c in the default location, and run the following .bat script from SDK15.3.0\examples\dfu\secure_bootloader\pca10040_ble\armgcc:

    make -j9
    mkdir files 
    
    del files\freertos_app.hex
    copy ..\..\..\..\test\251837\pca10040\s132\ses\Output\Release\Exe\ble_app_hrs_freertos_pca10040_s132.hex files\freertos_app.hex
    
    nrfutil settings generate --family NRF52 --application files\freertos_app.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 --key-file ..\..\..\..\dfu\private.key files\bl_settings.hex
    
    nrfjprog -e
    nrfjprog --program ..\..\..\..\..\components\softdevice\s132\hex\s132_nrf52_6.1.1_softdevice.hex
    nrfjprog --program _build\nrf52832_xxaa_s132.hex --verify
    nrfjprog --program files\freertos_app.hex --verify
    nrfjprog --program files\bl_settings.hex --verify
    nrfjprog --reset
    
    nrfutil pkg generate --application files\freertos_app.hex --application-version 2 --hw-version 52 --sd-req 0xB7 --key-file ..\..\..\private.key files\dfu_test.zip

    Then try to perform the DFU with the file generated in:

    SDK15.3.0\examples\dfu\secure_bootloader\pca10040_ble\armgcc\fikes\dfu_test.zip

    Does that start advertising on a DK, or not? If you don't use a DK, can you try to run it on a Nordic DK?

    BR,

    Edvin

  • NO HOPE.

    I did exactly the same.

    After I start the DFU on iOS, the EVB reboot. The APP is running but cannot update the FW.

    Seems the EVB cannot reboot to bootloader!!!5315.armgcc.zip

Related