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

nRF52 Serial Debug DFU does not work

Debug Mode Serial RTTHello everyone,

Tools and Software: nRF52DK, nRF52832, SDK 15.3, Serial DFU UART Debug PCA10040, SD132 v6.1.1

Application: ble_app_uart_pca10040_s132.hex

I have tested the DFU Serial example successfully and it works. However, for development purposes I wanted to get the DEBUG version of serial DFU working.

Everything works as expected until the firmware is flashed into the device. But when it is time for the app to boot, it fails as seen in the attachment.

Also, from the memory map it is observed that the application is successfully flashed.

Memory map

serialDFU_debug.log

What could be the reason for the failure to load the app?

Best regards,

Navin

  • Hello,

    Out of curiousity, what IDE are you using?

    What does nrfutil say when you transfer the image?

    Also, can you please let me know what commands you used to generate the packet? And did you do any other changes in the SDK files? Does the same happen if you start with a fresh unmodified copy of the SDK? Remember that some files are shared, so if you change them in one project, it may affect other projects as well.

    Best regards,

    Edvin

  • Hello Edvin,

    I am using Segger Embedded Studio to build the code. I am combining the HEX files using mergehex and using nRF programmer to flash.

    nrfutil says the device is programmed (in the end)..

    Commands used:

    nrfutil keys generate private.key

    nrfutil keys display --key pk --format code private.key --out_file public_key.c


    nrfutil settings generate --family NRF52 --application ble_app_uart_pca10040_s132.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 settings.hex



    nrfutil pkg generate --hw-version 52 --application-version 1 --application ble_app_uart_pca10040_s132.hex --sd-req 0xB7 --key-file private.key app_dfu_package.zip\

    nrfutil -vvvv dfu serial -pkg app_dfu_package.zip -p /dev/ttyACM3 -b 115200

    No, I ran this example out of the box, with RTT as the backend. Please find the SDK config file here. 6330.sdk_config.h

    The regular version (Without Debug) works fine. The problem is occuring when the image is about to be loaded after the DFU process.

    After the update LED 1 is supposed to blink indicating that the App has started. Also, I am not able to put the device into bootloader mode again by pressing Button 4.

    Let me know if you need more information..

    Best regards,

    Navin

  • Can you please tell me what it prints in the command window after you entered the command:

    "nrfutil -vvvv dfu serial -pkg app_dfu_package.zip -p /dev/ttyACM3 -b 115200"?

  • It looks like your bootloader asserts on the line saying:

    Received a fault! id: ...

    Based on the parameters it looks like an NRF_FAULT_ID_SDK_ASSERT.

    Have you done any changes to your bootloader? Remember that some changes you did in the normal bootloader project can affect the debug bootloader as well. 

    Can you try the following:

    Remove the app_error_fault_handler from main.c (comment it out), and define DEBUG in the preprocessor defines in your debug bootloader project. Does the log say something like:

    ASSERTION FAILED at "file name" "line number" ? If so, what assertion does it point to?

    Best regards,

    Edvin

Related