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

Unable to Perform a DFU over USB CDC ACM (the Bootloader never boots the new app)

Hi,

For my all DFU i follow the steps on the Getting started guide , just in the Performing DFU step i use the nrfutil tool for the over USB.

First i tried with the DFU examples provided, i started with the open_bootloader , uploaded that to the nrf52840 dk after a full erase. and then use nrfutil to upload the blinky_mbr.zip package located in the secure_dfu_test_images folder. the package gets loaded to the board, i can see the uploading process over the Command line.but, after that the blinky_mbr app never gets started. the board just turns off all the LEDs , and when i Reset it starts in the Bootloader mode, it never jumps to the app. i still can see the the bootloader /app files in nrf connect.

I used the debug version of the bootloader, And here is the logging i get:

Starting from the upload of the bootloader till the end of the DFU.

<info> app: Open USB bootloader started
<debug> app: In nrf_bootloader_init
<debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
<debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
<warning> nrf_dfu_settings: Resetting bootloader settings since neither the settings page nor the backup are valid (CRC error).
<debug> nrf_dfu_settings: Writing settings...
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FF000
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 0
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 0
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x20008640, len=896 bytes), queue usage: 1
<debug> nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0
<info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
<debug> nrf_dfu_settings: Writing settings...
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FE000
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 1
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x200089C0, len=896 bytes), queue usage: 1
<debug> nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0
<debug> app: Enter nrf_bootloader_fw_activate
<info> app: No firmware to activate.
<info> app: Boot validation failed. No valid app to boot.
<debug> app: DFU mode because app is not valid.
<info> nrf_bootloader_wdt: WDT is not enabled
<debug> app: in weak nrf_dfu_init_user
<debug> app: timer_stop (0x20000054)
<info> app: Entering DFU mode.
<info> app_timer: RTC: initialized.
<debug> app: Initializing transports (found: 1)
<debug> nrf_dfu_serial_usb: Initializing drivers.
<debug> nrf_dfu_serial_usb: Starting USB
<debug> nrf_dfu_serial_usb: USB Transport initialized
<debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
<debug> app: Enter main loop
<info> nrf_dfu_serial_usb: USB power detected
<info> nrf_dfu_serial_usb: USB ready
<warning> nrf_dfu_serial_usb: Could not read from CDC. Error: 0x92.
<debug> nrf_dfu_serial: Set receipt notif target: 0
<debug> nrf_dfu_serial_usb: Allocated buffer 20000130
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_RECEIPT_NOTIF_SET
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_serial: Sending Response: [0x2, 0x1]
<debug> nrf_dfu_serial: Received serial mtu
<debug> nrf_dfu_serial_usb: Allocated buffer 20000130
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_MTU_GET
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_serial: Sending Response: [0x7, 0x1]
<debug> nrf_dfu_serial_usb: Allocated buffer 20000130
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_SELECT (command)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_serial: Sending Response: [0x6, 0x1]
<debug> app: Shutting down transports (found: 1)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000130
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (command)
<debug> app: timer_stop (0x20000054)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_serial: Sending Response: [0x1, 0x1]
<debug> nrf_dfu_serial_usb: Allocated buffer 20000934
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (command)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_serial_usb: Allocated buffer 20000934
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (command)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_serial: Sending Response: [0x3, 0x1]
<debug> nrf_dfu_serial_usb: Allocated buffer 20000934
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (command)
<debug> nrf_dfu_validation: PB: Init packet data len: 62
<debug> app: Enter nrf_dfu_cache_prepare()
<debug> app: required_size: 0x5E4.
<debug> app: single_bank: true.
<debug> app: keep_app: false.
<debug> app: keep_softdevice: false.
<debug> app: SD_PRESENT: false.
<debug> app: Bank contents:
<debug> app: Bank 0 code: 0x00: Size: 0x0
<debug> app: Bank 1 code: 0x00: Size: 0x0
<debug> app: pass: 0.
<debug> app: cache_address: 0x1000.
<debug> app: cache_too_small: false.
<debug> app: keep_firmware: false.
<debug> app: delete_more: true.
<debug> app: pass: 1.
<debug> app: cache_address: 0x1000.
<debug> app: cache_too_small: false.
<debug> app: keep_firmware: true.
<debug> app: delete_more: true.
<debug> app: Invalidating app.
<debug> nrf_dfu_validation: Write address set to 0x00001000
<debug> nrf_dfu_settings: Writing settings...
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FF000
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 1
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 0
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x20008640, len=896 bytes), queue usage: 1
<debug> nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0
<info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
<debug> nrf_dfu_settings: Writing settings...
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FE000
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 1
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x200089C0, len=896 bytes), queue usage: 1
<debug> nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0
<debug> nrf_dfu_req_handler: Writing valid init command to flash.
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_serial: Sending Response: [0x4, 0x1]
<debug> nrf_dfu_serial_usb: Allocated buffer 20000934
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_SELECT (data)
<debug> nrf_dfu_req_handler: crc = 0x0, offset = 0x0, max_size = 0x1000
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_serial: Sending Response: [0x6, 0x1]
<debug> nrf_dfu_serial_usb: Allocated buffer 20000934
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (data)
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x00001000, len=1 pages), queue usage: 1
<debug> nrf_dfu_flash: Flash erase success: addr=0x00001000, pending 0
<debug> nrf_dfu_req_handler: Creating object with size: 1508. Offset: 0x00000000, CRC: 0x00000000
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_serial: Sending Response: [0x1, 0x1]
<debug> nrf_dfu_serial_usb: Allocated buffer 20000130
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x00001000, src=0x20000938, len=1024 bytes), queue usage: 1
<debug> nrf_dfu_flash: Flash write success: addr=0x00001000, pending 0
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_serial_usb: Allocated buffer 20000934
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x00001400, src=0x20000134, len=484 bytes), queue usage: 1
<debug> nrf_dfu_flash: Flash write success: addr=0x00001400, pending 0
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_serial_usb: Allocated buffer 20000934
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (data)
<debug> nrf_dfu_req_handler: Offset:1508, CRC:0x3477E14C
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<debug> nrf_dfu_serial: Sending Response: [0x3, 0x1]
<debug> nrf_dfu_serial_usb: Allocated buffer 20000934
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (data)
<debug> nrf_dfu_req_handler: Whole firmware image received. Postvalidating.
<debug> nrf_dfu_validation: Hash verification. start address: 0x1000, size: 0x5E4
<debug> nrf_dfu_validation: Invalidating old application in bank 0.
<debug> nrf_dfu_serial: Sending Response: [0x4, 0x1]
<debug> nrf_dfu_settings: Writing settings...
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FF000
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 1
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 0
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x20008640, len=896 bytes), queue usage: 1
<debug> nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0
<info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
<debug> nrf_dfu_settings: Writing settings...
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FE000
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 1
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x200089C0, len=896 bytes), queue usage: 1
<debug> nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0
<debug> nrf_dfu_req_handler: All flash operations have completed. DFU completed.
<debug> app: Shutting down transports (found: 1)
<debug> app: Resetting bootloader.
<info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
<debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
<info> app: Open USB bootloader started
<debug> app: In nrf_bootloader_init
<debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
<debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
<debug> nrf_dfu_settings: Using settings page.
<debug> nrf_dfu_settings: Copying forbidden parts from backup page.
<debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
<info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
<debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
<debug> app: Enter nrf_bootloader_fw_activate
<debug> app: Valid App
<debug> app: Enter nrf_dfu_app_continue
<debug> app: No copy needed
<debug> app: Setting app as valid
<debug> nrf_dfu_settings: Writing settings...
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FF000
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 0
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 0
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x20008640, len=896 bytes), queue usage: 1
<debug> nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0
<info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
<debug> nrf_dfu_settings: Writing settings...
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FE000
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 1
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x200089C0, len=896 bytes), queue usage: 1
<debug> nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0
<debug> app: Resetting bootloader.
<info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
<debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
<info> app: Open USB bootloader started
<debug> app: In nrf_bootloader_init

Have also tried to use the secure_bootloader, and trying to upload my DFU package, but same issue .and here is the logging i get:

Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000924
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)
Logs dropped (1)
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x00017400, src=0x20000124, len=1024 bytes), queue usage: 1
Logs dropped (1)
<debug> nrf_dfu_flash: Flash write success: addr=0x00017400, pending 0
Logs dropped (1)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (3)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000120
Logs dropped (2)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)
Logs dropped (4)
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x00017800, src=0x20000928, len=1024 bytes), queue usage: 1
Logs dropped (2)
<debug> nrf_dfu_flash: Flash write success: addr=0x00017800, pending 0
Logs dropped (2)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (3)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (3)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000924
Logs dropped (2)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)
Logs dropped (3)
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x00017C00, src=0x20000124, len=1024 bytes), queue usage: 1
Logs dropped (2)
<debug> nrf_dfu_flash: Flash write success: addr=0x00017C00, pending 0
Logs dropped (2)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000924
Logs dropped (2)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (data)
Logs dropped (2)
<debug> nrf_dfu_req_handler: Offset:94208, CRC:0xA6AE13B9
Logs dropped (2)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
Logs dropped (2)
<debug> nrf_dfu_serial: Sending Response: [0x3, 0x1]
<info> cdc_acm: EPIN_DATA: 81 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000924
Logs dropped (2)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (data)
Logs dropped (2)
<debug> nrf_dfu_serial: Sending Response: [0x4, 0x1]
Logs dropped (2)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
Logs dropped (2)
<debug> app: timer_stop (0x20000044)
Logs dropped (2)
<debug> app: timer_activate (0x20000044)
Logs dropped (2)
<info> cdc_acm: EPIN_DATA: 81 done
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000924
Logs dropped (2)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (data)
Logs dropped (4)
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x00018000, len=1 pages), queue usage: 1
Logs dropped (5)
<debug> nrf_dfu_flash: Flash erase success: addr=0x00018000, pending 0
<debug> nrf_dfu_req_handler: Creating object with size: 4096. Offset: 0x00017000, CRC: 0xA6AE13B9
Logs dropped (2)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
Logs dropped (2)
<debug> nrf_dfu_serial: Sending Response: [0x1, 0x1]
Logs dropped (1)
<info> cdc_acm: EPIN_DATA: 81 done
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000120
Logs dropped (3)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)
Logs dropped (2)
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x00018000, src=0x20000928, len=1024 bytes), queue usage: 1
Logs dropped (2)
<debug> nrf_dfu_flash: Flash write success: addr=0x00018000, pending 0
Logs dropped (1)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (3)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000924
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)
Logs dropped (3)
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x00018400, src=0x20000124, len=1024 bytes), queue usage: 1
Logs dropped (1)
<debug> nrf_dfu_flash: Flash write success: addr=0x00018400, pending 0
Logs dropped (2)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (1)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000120
Logs dropped (2)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)
Logs dropped (4)
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x00018800, src=0x20000928, len=1024 bytes), queue usage: 1
Logs dropped (2)
<debug> nrf_dfu_flash: Flash write success: addr=0x00018800, pending 0
Logs dropped (2)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000924
Logs dropped (2)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)
Logs dropped (3)
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x00018C00, src=0x20000124, len=1024 bytes), queue usage: 1
Logs dropped (2)
<debug> nrf_dfu_flash: Flash write success: addr=0x00018C00, pending 0
Logs dropped (2)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000924
Logs dropped (2)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (data)
Logs dropped (2)
<debug> nrf_dfu_req_handler: Offset:98304, CRC:0xD86AAEC2
Logs dropped (2)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
Logs dropped (2)
<debug> nrf_dfu_serial: Sending Response: [0x3, 0x1]
<info> cdc_acm: EPIN_DATA: 81 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000924
Logs dropped (2)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (data)
Logs dropped (2)
<debug> nrf_dfu_serial: Sending Response: [0x4, 0x1]
Logs dropped (2)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
Logs dropped (2)
<debug> app: timer_stop (0x20000044)
Logs dropped (2)
<debug> app: timer_activate (0x20000044)
Logs dropped (2)
<info> cdc_acm: EPIN_DATA: 81 done
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000924
Logs dropped (2)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_CREATE (data)
Logs dropped (4)
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x00019000, len=1 pages), queue usage: 1
Logs dropped (5)
<debug> nrf_dfu_flash: Flash erase success: addr=0x00019000, pending 0
<debug> nrf_dfu_req_handler: Creating object with size: 784. Offset: 0x00018000, CRC: 0xD86AAEC2
Logs dropped (2)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
Logs dropped (2)
<debug> nrf_dfu_serial: Sending Response: [0x1, 0x1]
Logs dropped (1)
<info> cdc_acm: EPIN_DATA: 81 done
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000120
Logs dropped (2)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)
Logs dropped (4)
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x00019000, src=0x20000928, len=784 bytes), queue usage: 1
Logs dropped (5)
<debug> nrf_dfu_flash: Flash write success: addr=0x00019000, pending 0
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
Logs dropped (2)
<info> cdc_acm: EPOUT_DATA: 01 done
<debug> nrf_dfu_serial_usb: Allocated buffer 20000120
Logs dropped (2)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (data)
Logs dropped (1)
<debug> nrf_dfu_req_handler: Offset:99088, CRC:0x3C49E020
Logs dropped (2)
<debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
Logs dropped (4)
<debug> nrf_dfu_serial: Sending Response: [0x3, 0x1]
<info> cdc_acm: EPIN_DATA: 81 done
<info> cdc_acm: EPOUT_DATA: 01 done
Logs dropped (2)
<debug> nrf_dfu_serial_usb: Allocated buffer 20000120
Logs dropped (1)
<debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (data)
<debug> nrf_dfu_req_handler: Whole firmware image received. Postvalidating.
Logs dropped (4)
<debug> nrf_dfu_validation: Hash verification. start address: 0x1000, size: 0x18310
<debug> nrf_dfu_validation: Invalidating old application in bank 0.
Logs dropped (4)
<debug> nrf_dfu_serial: Sending Response: [0x4, 0x1]
<debug> nrf_dfu_settings: Writing settings...
Logs dropped (2)
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FF000
Logs dropped (4)
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 1
Logs dropped (3)
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 0
Logs dropped (4)
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x200084C8, len=896 bytes), queue usage: 1
Logs dropped (3)
<debug> nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0
Logs dropped (3)
<info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
<debug> nrf_dfu_settings: Writing settings...
Logs dropped (1)
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FE000
Logs dropped (2)
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 1
Logs dropped (2)
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0
Logs dropped (3)
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x20008848, len=896 bytes), queue usage: 1
Logs dropped (4)
<debug> nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0
Logs dropped (2)
<debug> nrf_dfu_req_handler: All flash operations have completed. DFU completed.
Logs dropped (2)
<debug> app: Shutting down transports (found: 1)
<debug> app: Resetting bootloader.
Logs dropped (2)
<info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
Logs dropped (2)
<debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
<info> app: Inside main
<debug> app: In nrf_bootloader_init
<debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
<debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
<debug> nrf_dfu_settings: Using settings page.
<debug> nrf_dfu_settings: Copying forbidden parts from backup page.
<debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
<info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
<debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
<debug> app: Enter nrf_bootloader_fw_activate
<debug> app: Valid App
<debug> app: Enter nrf_dfu_app_continue
<debug> app: No copy needed
<debug> app: Setting app as valid
<debug> nrf_dfu_settings: Writing settings...
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FF000
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 0
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 0
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x200084C8, len=896 bytes), queue usage: 1
<debug> nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0
<info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
<debug> nrf_dfu_settings: Writing settings...
<debug> nrf_dfu_settings: Erasing old settings at: 0x000FE000
<debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 1
<debug> nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0
<debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x20008848, len=896 bytes), queue usage: 1
<debug> nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0
<debug> app: Resetting bootloader.
<info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
<debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
<info> app: Inside main
<info> app: Inside main

Best Regards,

Abdelali

Parents
  • Hi Abdelali, 
    which SDK version are you using?

    Can you place a breakpoint at nrf_bootloader_app_start() in nrf_bootloader_init()? IF you reach the nrf_bootloader_app_start() call, then its the application that is not functioning properly. 

    Best regards

    Bjørn

  • Hi Bjørn,

    I'm using nRF5_SDK V16.0.0.

    Yes i can reach the nrf_bootloader_app_start() call. and here's the log i get after that : 

    <debug> app: Running nrf_bootloader_app_start with address: 0x00001000
    <debug> app: Disabling interrupts. NVIC->ICER[0]: 0x4

    // i think a reset was done here


    <info> app: Inside main
    <info> app: In nrf_bootloader_init
    <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    <debug> nrf_dfu_settings: Using settings page.
    <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    <debug> app: Enter nrf_bootloader_fw_activate

    and a  NRF_LOG_INFO("p_bank->bank_code = 0x%x.", p_bank->bank_code); at this point returns
    <info> app: p_bank->bank_code = 0x0.

    i think the issue here is the p_bank->bank_code  value is 0x0 means  NRF_DFU_BANK_INVALID is returned.

    and so the bootloader won't ever start the actual application, it will just keep checking for dfu_enter_check() and timeouts.

    the bootloader keeps logging  the same logs as above .

    Not sure why the p_bank->bank_code = 0 , i'm using the  secure_bootloader\pca10056_usb_debug, tested with the blinky_mbr package provided in secure_dfu_test_images\uart\nrf52840. also with my own generated Zip package, and got the same issue/log.

    Best regards,

    Abdelali

  • HI Abdelali, 

    I was not able to reproduce the issue with the open bootloader

    1. Flash nRF5_SDK_16.0.0_98a08e2\examples\dfu\open_bootloader\pca10056_usb_debug\ example to nRF52840 DK
    2. Set Power switch to OFF
    3. Set SW9 to USB
    4. Connect USB cable to nRF USB connector(J3) and SW6 to nRF Only
    5. Set Power switch to ON
    6. Perform DFU using the following nrfutil command: nrfutil -vvvv dfu serial -pkg blinky_mbr.zip -p COM28 -b 115200

    nrfutil output

    2020-03-20 16:54:20,898 Using board at serial port: COM28
    2020-03-20 16:54:20,904 Sending Application image.
    2020-03-20 16:54:24,413 SLIP: --> [9, 1]
    2020-03-20 16:54:24,414 SLIP: <-- [96, 9, 1, 1]
    2020-03-20 16:54:24,414 Serial: Set Packet Receipt Notification 0
    2020-03-20 16:54:24,414 SLIP: --> [2, 0, 0]
    2020-03-20 16:54:24,415 SLIP: <-- [96, 2, 1]
    2020-03-20 16:54:24,417 SLIP: --> [7]
    2020-03-20 16:54:24,417 SLIP: <-- [96, 7, 1, 3, 8]
    2020-03-20 16:54:24,417 Sending init packet...
    2020-03-20 16:54:24,417 Serial: Selecting Object: type:1
    2020-03-20 16:54:24,418 SLIP: --> [6, 1]
    2020-03-20 16:54:24,420 SLIP: <-- [96, 6, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    2020-03-20 16:54:24,420 Serial: Object selected:  max_size:512 offset:0 crc:0
    2020-03-20 16:54:24,420 SLIP: --> [1, 1, 139, 0, 0, 0]
    2020-03-20 16:54:24,421 SLIP: <-- [96, 1, 1]
    2020-03-20 16:54:24,421 Serial: Streaming Data: len:139 offset:0 crc:0x00000000
    2020-03-20 16:54:24,423 SLIP: --> [8, 18, 136, 1, 10, 66, 8, 1, 18, 62, 8, 1, 16, 52, 26, 1, 0, 32, 0, 40, 0, 48, 0, 56, 228, 11, 66, 36, 8, 3, 18, 32, 233, 115, 9, 232, 172, 129, 192, 72, 117, 215, 73, 239, 14, 179, 63, 224, 51, 246, 206, 39, 167, 80, 225, 188, 208, 18, 166, 31, 72, 12, 205, 245, 72, 1, 82, 4, 8, 1, 18, 0, 16, 0, 26, 64, 252, 184, 99, 174, 151, 188, 100, 249, 59, 140, 233, 26, 169, 190, 46, 99, 234, 235, 220, 192, 94, 6, 124, 205, 253, 250, 84, 219, 250, 103, 244, 235, 66, 34, 28, 67, 35, 183, 143, 234, 56, 183, 10, 183, 226, 13, 176, 173, 90, 135, 232, 34, 153, 10, 51, 170, 245, 116, 190, 103, 180, 126, 85, 213]
    2020-03-20 16:54:24,424 SLIP: --> [3]
    2020-03-20 16:54:24,426 SLIP: <-- [96, 3, 1, 139, 0, 0, 0, 70, 140, 70, 79]
    2020-03-20 16:54:24,426 SLIP: --> [4]
    2020-03-20 16:54:24,615 SLIP: <-- [96, 4, 1]
    2020-03-20 16:54:24,615 Sending firmware file...
    2020-03-20 16:54:24,617 Serial: Selecting Object: type:2
    2020-03-20 16:54:24,617 SLIP: --> [6, 2]
    2020-03-20 16:54:24,619 SLIP: <-- [96, 6, 1, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    2020-03-20 16:54:24,621 Serial: Object selected:  max_size:4096 offset:0 crc:0
    2020-03-20 16:54:24,621 SLIP: --> [1, 2, 228, 5, 0, 0]
    2020-03-20 16:54:24,707 SLIP: <-- [96, 1, 1]
    2020-03-20 16:54:24,709 Serial: Streaming Data: len:1508 offset:0 crc:0x00000000
    2020-03-20 16:54:24,710 SLIP: --> [8, 16, 32, 0, 32, 21, 18, 0, 0, 29, 18, 0, 0, 31, 18, 0, 0, 33, 18, 0, 0, 35, 18, 0, 0, 37, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 18, 0, 0, 41, 18, 0, 0, 0, 0, 0, 0, 43, 18, 0, 0, 45, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 18, 0, 0, 0, 0, 0, 0, 47, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 248, 12, 208, 0, 240, 24, 248, 0, 72, 0, 71, 253, 20, 0, 0, 16, 32, 0, 32, 6, 72, 128, 71, 6, 72, 0, 71, 254, 231, 254, 231, 254, 231, 254, 231, 254, 231, 254, 231, 254, 231, 254, 231, 254, 231, 254, 231, 93, 18, 0, 0, 1, 18, 0, 0, 6, 76, 7, 77, 6, 224, 224, 104, 64, 240, 1, 3, 148, 232, 7, 0, 152, 71, 16, 52, 172, 66, 246, 211, 255, 247, 218, 255, 192, 21, 0, 0, 224, 21, 0, 0, 48, 181, 79, 240, 128, 80, 0, 34, 131, 0, 208, 248, 48, 17, 195, 248, 12, 33, 195, 248, 16, 33, 98, 75, 26, 96, 98, 75, 27, 104, 98, 76, 35, 96, 96, 75, 27, 29, 27, 104, 36, 29, 35, 96, 93, 75, 8, 51, 27, 104, 36, 29, 35, 96, 91, 75, 12, 51, 27, 104, 36, 29, 35, 96, 88, 75, 16, 51, 27, 104, 36, 29, 35, 96, 86, 75, 20, 51, 27, 104, 36, 29, 35, 96, 83, 75, 24, 51, 27, 104, 83, 76, 32, 52, 35, 96, 80, 75, 28, 51, 27, 104, 36, 29, 35, 96, 78, 75, 32, 51, 27, 104, 36, 29, 35, 96, 75, 75, 36, 51, 27, 104, 36, 29, 35, 96, 73, 75, 40, 51, 27, 104, 36, 29, 35, 96, 70, 75, 44, 51, 27, 104, 36, 29, 35, 96, 68, 75, 48, 51, 27, 104, 67, 76, 64, 52, 35, 96, 65, 75, 52, 51, 27, 104, 36, 29, 35, 96, 62, 75, 56, 51, 27, 104, 36, 29, 35, 96, 60, 75, 60, 51, 27, 104, 36, 29, 35, 96, 57, 75, 64, 51, 27, 104, 36, 29, 35, 96, 1, 35, 8, 41, 2, 209, 208, 248, 52, 65, 20, 177, 8, 41, 4, 208, 6, 224, 53, 76, 52, 73, 33, 96, 5, 224, 208, 248, 52, 65, 20, 177, 8, 41, 4, 208, 6, 224, 49, 76, 251, 33, 33, 96, 5, 224, 208, 248, 52, 65, 20, 177, 8, 41, 8, 208, 14, 224, 144, 248, 88, 66, 44, 72, 1, 104, 100, 243, 3, 1, 1, 96, 2, 224, 208, 248, 52, 65, 28, 185, 41, 73, 79, 244, 0, 112, 8, 96, 40, 72, 1, 104, 201, 7, 2, 208, 111, 240, 1, 1, 1, 96, 37, 72, 1, 104, 65, 244, 112, 1, 1, 96, 191, 243, 79, 143, 191, 243, 111, 143, 79, 240, 16, 33, 209, 248, 0, 2, 0, 40, 3, 219, 209, 248, 4, 2, 0, 40, 34, 218, 29, 76, 35, 96, 29, 72, 3, 104, 0, 43, 252, 208, 18, 35, 193, 248, 0, 50, 5, 104, 0, 45, 252, 208, 193, 248, 4, 50, 1, 104, 0, 41, 252, 208, 34, 96, 1, 104, 0, 41, 252, 208, 191, 243, 79, 143, 16, 72, 124, 56, 1, 104, 18, 74, 1, 244, 224, 97, 17, 67, 1, 96, 191, 243, 79, 143, 0, 191, 253, 231, 15, 73, 14, 72, 8, 96, 48, 189, 56, 5, 0, 64]
    2020-03-20 16:54:24,719 SLIP: --> [8, 4, 4, 0, 16, 32, 197, 0, 64, 72, 129, 3, 0, 140, 86, 0, 64, 24, 245, 0, 64, 228, 14, 0, 64, 64, 150, 2, 64, 0, 4, 0, 64, 136, 237, 0, 224, 4, 229, 1, 64, 0, 228, 1, 64, 4, 0, 250, 5, 0, 144, 208, 3, 8, 0, 0, 32, 2, 224, 8, 200, 18, 31, 8, 193, 0, 42, 250, 209, 112, 71, 112, 71, 0, 32, 1, 224, 1, 193, 18, 31, 0, 42, 251, 209, 112, 71, 0, 0, 45, 233, 252, 65, 6, 70, 192, 7, 79, 240, 0, 5, 14, 208, 16, 79, 0, 36, 1, 34, 56, 93, 0, 149, 0, 35, 17, 70, 1, 149, 0, 240, 89, 248, 100, 28, 4, 44, 244, 211, 0, 240, 50, 248, 176, 7, 13, 213, 7, 78, 0, 36, 54, 29, 0, 34, 48, 93, 3, 35, 0, 149, 17, 70, 1, 149, 0, 240, 71, 248, 100, 28, 4, 44, 244, 211, 189, 232, 252, 129, 182, 21, 0, 0, 9, 73, 8, 181, 8, 92, 0, 144, 104, 70, 0, 240, 83, 248, 208, 248, 4, 37, 0, 155, 1, 33, 153, 64, 33, 234, 2, 3, 192, 248, 8, 53, 17, 64, 192, 248, 12, 21, 8, 189, 182, 21, 0, 0, 2, 73, 8, 92, 1, 33, 0, 240, 77, 184, 0, 0, 182, 21, 0, 0, 16, 181, 0, 36, 32, 70, 255, 247, 243, 255, 100, 28, 4, 44, 249, 211, 16, 189, 0, 0, 1, 32, 255, 247, 171, 255, 9, 76, 79, 244, 250, 120, 79, 244, 122, 71, 0, 38, 48, 70, 255, 247, 204, 255, 69, 70, 97, 28, 56, 70, 136, 71, 109, 30, 250, 209, 118, 28, 4, 46, 243, 219, 241, 231, 176, 21, 0, 0, 45, 233, 255, 65, 28, 70, 221, 233, 10, 120, 21, 70, 14, 70, 104, 70, 0, 240, 16, 248, 70, 234, 69, 1, 65, 234, 132, 1, 65, 234, 7, 34, 66, 234, 8, 65, 0, 154, 0, 235, 130, 0, 192, 248, 0, 23, 189, 232, 255, 129, 0, 0, 1, 104, 32, 41, 2, 210, 79, 240, 160, 64, 112, 71, 1, 240, 31, 1, 1, 96, 1, 72, 112, 71, 0, 0, 0, 3, 0, 80, 56, 181, 1, 36, 0, 144, 104, 70, 49, 177, 255, 247, 235, 255, 0, 153, 140, 64, 192, 248, 8, 69, 56, 189, 255, 247, 228, 255, 0, 153, 140, 64, 192, 248, 12, 69, 56, 189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 56, 253, 216, 112, 71, 13, 14, 15, 16, 11, 12, 24, 25, 0, 0, 224, 21, 0, 0, 8, 0, 0, 32, 4, 0, 0, 0, 56, 20, 0, 0, 228, 21, 0, 0, 12, 0, 0, 32, 4, 32, 0, 0, 72, 20, 0, 0, 0, 144, 208, 3]
    2020-03-20 16:54:24,733 SLIP: --> [3]
    2020-03-20 16:54:24,740 SLIP: <-- [96, 3, 1, 228, 5, 0, 0, 76, 225, 119, 52]
    2020-03-20 16:54:24,742 SLIP: --> [4]
    2020-03-20 16:54:24,749 SLIP: <-- [96, 4, 1]
    2020-03-20 16:54:24,750 Image sent in 0.332000017166s
    Device programmed.

    Powering the nRF52840 DK from J2 and setting SW9 to VDD and SW6 to Default shows the LEDs blinking so the DFU update was successful. 

  • Hi Bjørn,

    Thanks for the instructions.

    Well, I'm able to flash this package blinky_mbr.zip and produce my own, after playing with the blinky main file, to test the firmware update.but, still have the same issue with my application firmware. beside that, i noticed that the blinky example has two versions blank and mbr, i can update the mbr version main file and build the package and successfully flash it .but, this doesn't work for the blank version! even generating the settings file, fail.

    Comparing between the two projects, i noticed that the FLASH/RAM START parameters values are different. for the mbr version the FLASH starts at 0x1000, and the RAM at 0x20000008. i think this is what makes it compatible with the bootloader. can you please elaborate a little bit on this ?

    My application is a HID device, with the cdc acm class added for serial communication. do i need to update any project settings, or configs in order to build the DFU package ?

    Thanks again

    Best regards,

    Abdelali

  • abdelali said:
    Comparing between the two projects, i noticed that the FLASH/RAM START parameters values are different. for the mbr version the FLASH starts at 0x1000, and the RAM at 0x20000008. i think this is what makes it compatible with the bootloader. can you please elaborate a little bit on this ?

     Yes, if you have an application that does not use the SoftDevice, then the flash start address should be 0x1000 and the RAM start address should be 0x20000008. The SDK examples are not compiled to be position independent so since the MBR occupies the first flash page, i.e. 0x0000 to 0x1000, then the application should be compiled with flash start address set to 0x1000. 

    The MBR uses the RAM from 0x20000000 to 0x20000008, so the application RAM start address should be set to 0x20000008.

Reply
  • abdelali said:
    Comparing between the two projects, i noticed that the FLASH/RAM START parameters values are different. for the mbr version the FLASH starts at 0x1000, and the RAM at 0x20000008. i think this is what makes it compatible with the bootloader. can you please elaborate a little bit on this ?

     Yes, if you have an application that does not use the SoftDevice, then the flash start address should be 0x1000 and the RAM start address should be 0x20000008. The SDK examples are not compiled to be position independent so since the MBR occupies the first flash page, i.e. 0x0000 to 0x1000, then the application should be compiled with flash start address set to 0x1000. 

    The MBR uses the RAM from 0x20000000 to 0x20000008, so the application RAM start address should be set to 0x20000008.

Children
Related