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

nrf52840 dongle alway boot in dfu

Tried to flash ncp .hex for pca10059 on a brand new dongle and now it is stuck in dfu (pulsing red led). The process worked on a second dongle without any issues.

Something is wrong with the dongle?

  • # nRFConnect System Report - 2019-09-13T14-35-45.037Z

    - System: Apple Inc. MacBookPro14,3
    - BIOS: Apple Inc.
    - CPU: 1 x Intel® CoreTm i7-7820HQ 2.90 GHz 8 cores (4 physical)
    - Memory: 3.5 GB free of 16 GB total
    - Filesystem: /dev/disk1s1 (HFS) 465.6 GB 91.3% used

    - OS: Mac OS X (10.14.6) darwin x64

    - Versions
    - kernel: 18.7.0
    - git: 2.20.1
    - node: 12.0.0
    - python: 2.7.10
    - python3:

    - Connected devices:
    - /dev/tty.usbmodemF16F8E7748791: F16F8E774879

    - Current device:
    - family: nRF52
    - type: nRF52840
    - romBaseAddr: 0x00
    - romSize: 1024 KiB
    - ramSize: 256 KiB
    - pageSize: 4 KiB
    - blAddrOffset: 0x14
    - blockSize: 512
    - ficrBaseAddr: 0x10000000
    - ficrSize: 1024
    - uicrBaseAddr: 0x10001000
    - uicrSize: 1024
    - mbrBaseAddr: 0x00
    - mbrParamsOffset: 24
    - mbrSize: 4096

  • Got the dfu back but cant flash any samples.

    2019-09-13T14:35:36.982Z INFO Application data folder: /Users/nicolasp/Library/Application Support/nrfconnect/pc-nrfconnect-programmer
    2019-09-13T14:35:37.162Z DEBUG App pc-nrfconnect-programmer v1.2.3 official
    2019-09-13T14:35:37.162Z DEBUG App path: /Users/nicolasp/.nrfconnect-apps/node_modules/pc-nrfconnect-programmer
    2019-09-13T14:35:37.162Z DEBUG nRFConnect 3.2.0 is supported by the app (^3.2.0)
    2019-09-13T14:35:37.162Z DEBUG nRFConnect path: /Applications/nRF Connect.app/Contents/Resources/app.asar
    2019-09-13T14:35:37.162Z DEBUG HomeDir: /Users/nicolasp
    2019-09-13T14:35:37.162Z DEBUG TmpDir: /var/folders/3p/7dll1x5n71g7kyfzwq_3sv1cfrxpfc/T/
    2019-09-13T14:35:37.208Z INFO Using nrfjprog library 10.3.0, pc-nrfjprog-js 1.5.8
    2019-09-13T14:35:37.209Z VERBOSE Could not fetch serial number for serial port at /dev/tty.MALS
    2019-09-13T14:35:37.209Z VERBOSE Could not fetch serial number for serial port at /dev/tty.SOC
    2019-09-13T14:35:37.209Z VERBOSE Could not fetch serial number for serial port at /dev/tty.Bluetooth-Incoming-Port
    2019-09-13T14:35:37.209Z VERBOSE Could not fetch serial number for serial port at /dev/tty.Maker-3877-RN-iAP-4
    2019-09-13T14:35:43.377Z INFO Using USB SDFU protocol to communicate with target
    2019-09-13T14:35:43.389Z INFO Protocol Version: 1 found
    2019-09-13T14:35:43.391Z INFO Hardware: 52840 found
    2019-09-13T14:35:43.395Z INFO Firmware: Bootloader found
    2019-09-13T14:35:45.037Z INFO Generating system report...
    2019-09-13T14:35:45.277Z INFO System report: /Users/nicolasp/Library/Application Support/nrfconnect/pc-nrfconnect-programmer/nrfconnect-system-report-2019-09-13T14-35-45.037Z.txt
    2019-09-13T14:36:13.497Z INFO Parsing HEX file: /Users/nicolasp/Source/nRF5_SDK_for_Thread_and_Zigbee_v3.1.0_c7c4730/examples/peripheral/blinky/hex/blinky_pca10059_mbr.hex
    2019-09-13T14:36:13.512Z INFO File was last modified at 6/8/2019, 9:19:50 PM
    2019-09-13T14:36:13.516Z INFO Data block: 0x00000000-0x00000B00 (0x00000B00 bytes long)
    2019-09-13T14:36:13.516Z INFO Data block: 0x00001000-0x00001640 (0x00000640 bytes long)
    2019-09-13T14:36:33.165Z INFO Parsing HEX file: /Users/nicolasp/Source/nRF5_SDK_15.3.0_59ac345/examples/peripheral/blinky/hex/blinky_pca10059_mbr.hex
    2019-09-13T14:36:33.165Z INFO File was last modified at 9/3/2019, 3:31:40 PM
    2019-09-13T14:36:33.180Z INFO Data block: 0x00000000-0x00000B00 (0x00000B00 bytes long)
    2019-09-13T14:36:33.180Z INFO Data block: 0x00001000-0x00001640 (0x00000640 bytes long)
    2019-09-13T14:36:38.731Z INFO Hash is generated by SHA256
    2019-09-13T14:36:38.734Z INFO Performing DFU. This may take a few seconds
    2019-09-13T14:36:38.749Z INFO DFU procedure starts. This may take a few seconds.
    2019-09-13T14:36:38.974Z ERROR DFU failed: Error message for known extended error code from DFU target: The hash of the received firmware image does not match the hash in the init packet.
    2019-09-13T14:36:41.072Z ERROR Device not found due to failure during DFU
    2019-09-13T14:36:41.873Z INFO Target device closed.
    2019-09-13T14:37:13.032Z INFO Parsing HEX file: /Users/nicolasp/Source/nRF5_SDK_15.3.0_59ac345/examples/peripheral/blinky/hex/blinky_pca10059_mbr.hex
    2019-09-13T14:37:13.032Z INFO File was last modified at 9/3/2019, 3:31:40 PM
    2019-09-13T14:37:13.035Z INFO Data block: 0x00000000-0x00000B00 (0x00000B00 bytes long)
    2019-09-13T14:37:13.035Z INFO Data block: 0x00001000-0x00001640 (0x00000640 bytes long)
    2019-09-13T14:37:16.572Z INFO Using USB SDFU protocol to communicate with target
    2019-09-13T14:37:16.582Z INFO Protocol Version: 1 found
    2019-09-13T14:37:16.583Z INFO Hardware: 52840 found
    2019-09-13T14:37:16.584Z INFO Firmware: Bootloader found
    2019-09-13T14:37:18.678Z INFO Hash is generated by SHA256
    2019-09-13T14:37:18.680Z INFO Performing DFU. This may take a few seconds
    2019-09-13T14:37:18.686Z INFO DFU procedure starts. This may take a few seconds.
    2019-09-13T14:37:18.905Z ERROR DFU failed: Error message for known extended error code from DFU target: The hash of the received firmware image does not match the hash in the init packet.
    2019-09-13T14:37:21.002Z ERROR Device not found due to failure during DFU
    2019-09-13T14:37:21.798Z INFO Target device closed.

  • Hi again

    This error points towards the init packet being generated for the wrong firmware. Which seems strange as this is a "fresh" Dongle. Could you please read out a few bytes from the flash for me? You'll have to use a debugger in order to do this. Use the command "nrfjprog --memrd 0x10000070 --n 16" and post the output here, please. I have to check if the Dongle acts as it should or not. 

    Best regards,

    Simon

  • 0x10000070: 53534E50 4C123037 AA55AA18 FFFFFF55   |PNSS70.L..U.U...|

  • This also points to the Dongle being completely normal...

    Could you try flashing just the S140 SoftDevice onto the chip? How does the memory layout look when you connect the Dongle in nRFConnect's programmer app? Please provide a screenshot of the programmer app when you've read the memory on the Dongle, and what address range the bootloader and MBR are.

    Are you able to see anything suspicious on the chip itself? If possible, could you upload a high-resolution picture of the faulty Dongle?

    Best regards,

    Simon

Related