This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF52832 DFU over UART

Hello,

I'm using nRF52832 and the SDK version is "nRF5_SDK_17.0.2_d674dde" ,

First I tried DFU over UART using \examples\dfu\secure_dfu_test_images\uart\nrf52832, and it worked fine

but when I tried to rebuild the source code \examples\dfu\secure_bootloader\pca10040_uart\ses and do the same steps as above,then it doesn't work

I can't see my device in nRF Connect anymore, and J-Link RTT Viewer doesn't show any log

what is the different betweet example bootloader hex and the bootloader hex I rebuilt

  • Hi 

    I decided to test the next step with the debug version first,

    I have a problem......

    Here are my test steps

    1. Generate bootloader setting

    2. Merge bootloader with bootloader_setting and the application and the softdevice

    3. Flash the device

    4. Send command to return in the bootloader and to switch in DFU mode

    5. Enter the following command to start the DFU process over the serial link

         nrfutil dfu serial -pkg 1234567.zip -p COM4 -fc 0 -b 115200

    here is the log

    00> <info> app: Inside main
    00> <debug> app: In nrf_bootloader_init
    00> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    00> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    00> <debug> nrf_dfu_settings: Using settings page.
    00> <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    00> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    00> <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
    00> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    00> <debug> app: Enter nrf_bootloader_fw_activate
    00> <info> app: No firmware to activate.
    00> <debug> app: App is valid
    00> <warning> nrf_dfu_settings: No additional <info> app: Inside main
    00> <debug> app: In nrf_bootloader_init
    00> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    00> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    00> <debug> nrf_dfu_settings: Using settings page.
    00> <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    00> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    00> <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
    00> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    00> <debug> app: Enter nrf_bootloader_fw_activate
    00> <info> app: No firmware to activate.
    00> <debug> app: App is valid
    00> <debug> app: DFU mode requested via GPREGRET.
    00> <info> nrf_bootloader_wdt: WDT is not enabled
    00> <debug> app: in weak nrf_dfu_init_user
    00> <debug> app: timer_stop (0x20000024)
    00> <debug> app: timer_activate (0x20000024)
    00> <info> app: Entering DFU mode.
    00> <debug> app: Initializing transports (found: 1)
    00> <debug> nrf_dfu_serial_uart: serial_dfu_transport_init()
    00> <debug> nrf_dfu_serial_uart: serial_dfu_transport_init() completed
    00> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    00> <debug> app: Enter main loop

    After the fifth step I got nothing until device auto leaves DFU mode

    Did I miss something?

  • Hi,

    This log shows that the devices entered DFU mode, but it doe snot show that a DFU operation has been started. You write that you attempted to update using the "nrfutil dfu serial -pkg 1234567.zip -p COM4 -fc 0 -b 115200" command, but there is no trace of it in the log. Can you try again, and make sure you do it after you see in the log that the nRF is in DFU mode? What happens then? And what is the output you get from nrfutil?

  • Hi,

    I've finally done DFU over UART, but have some questions I'd like to know,

    after I using the "nrfutil dfu serial -pkg 1234567.zip -p COM4 -fc 0 -b 115200" command, it takes at least 20 seconds before the DFU process starts, no log is displayed during these 20 seconds,I want to know why it takes so long to wait 20 seconds?

  • Hi,

    Testing just an example on my side I do not see the same delay (it takes a couple of seconds though). There is no verbose logging for the serial dfu in nrfutil so if you want more information about what is happening I suggest you dump the UART traffic and inspect it.

Related