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

Trouble programming nrf5340dk

I am following the guide on this page: https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nrfconnect

I can build the firmware, but having trouble to program the nRF5340DK. 

west flash --recover

ERROR: The --family option given with the command (or the default from nrfjprog.ini) does not match the device connected.

FATAL ERROR: command exited with status 18: nrfjprog --recover -f NRF53 --coprocessor CP_NETWORK --snr 960138681

nrfjprog version: 10.13.0 

JLinkARM.dll version: 7.50a

- OS: macOS (11.5) darwin x64

- Versions
- kernel: 20.6.0
- git: 2.30.1
- node: 12.13.0
- python: 2.7.16
- python3: 3.8.2

- Connected devices:
- /dev/tty.usbmodem0009601386815: 000960138681 PCA10095

  • Hi Hongfeng! 

    Thats odd. Do you know what chip version are you using? 

    And what does it output when you run:

    nrfjprog --recover --coprocessor CP_NETWORK -f NRF53
    nrfjprog --recover -f NRF53

    Best regards,

    Elfving

  • nrfjprog --recover --coprocessor CP_NETWORK -f NRF53

    ERROR: The --family option given with the command (or the default from nrfjprog.ini) does not match the device connected.

    nrfjprog --recover -f NRF53 --log

    ERROR: [  nRF53] - Debug probe is not connected to an NRF53 series device.

    ERROR: The --family option given with the command (or the default from nrfjprog.ini) does not match the device connected.

    The sticker on the board:

    PCA10095

    0.11.0

    2020.51

    960138681

    FYI, I was able to program nRF52840 Dongle on the same laptop setup

  • Could you give me that logfile that was generated?

    And could you try "nrfjprog --eraseall", as well as checking the Programmer in the nRF Connect App?

    Best regards,

    Elfving

  • nrfjprog --eraseall --log

    ERROR: [  nRFXX] - Device does not have an ARM debug port.

    ERROR: nrfjprog could not identify the target device...

    nRF connect programmer: when target is selected:

    2021-07-22T17:53:05.026Z INFO Using nrfjprog library 10.12.1, pc-nrfjprog-js 1.7.6
    2021-07-22T17:53:05.103Z DEBUG App pc-nrfconnect-programmer v1.4.11 official
    2021-07-22T17:53:05.103Z DEBUG App path: /Users/hongfeng/.nrfconnect-apps/node_modules/pc-nrfconnect-programmer
    2021-07-22T17:53:05.103Z DEBUG nRFConnect 3.7.0, required by the app is (^3.6.0)
    2021-07-22T17:53:05.104Z DEBUG nRFConnect path: /Applications/nRF Connect.app/Contents/Resources/app.asar
    2021-07-22T17:53:05.104Z DEBUG HomeDir: /Users/hongfeng
    2021-07-22T17:53:05.104Z DEBUG TmpDir: /var/folders/5m/7jg_758d6bd7qv9p_89fv1dr0000gp/T/
    2021-07-22T17:53:11.543Z INFO Using nrfjprog to communicate with target
    2021-07-22T17:53:12.311Z ERROR Could not fetch memory size of target devkit: Error: Error occured when get library info. Errorcode: CouldNotOpenDevice (0x4)
    Lowlevel error: Unknown value (fffffffa)

    # nRFConnect System Report - 2021-07-20T23-03-29.533Z

    - System: Apple Inc. MacBookPro14,3
    - BIOS: Apple Inc. 429.140.8.0.0
    - CPU: 1 x Intel® CoreTm i7-7820HQ 2.9 GHz 8 cores (4 physical)
    - Memory: 1.4 GB free of 16 GB total
    - Filesystem: /dev/disk1s5s1 (APFS) 465 GB 29.1% used

    - OS: macOS (11.5) darwin x64

    - Versions
    - kernel: 20.6.0
    - git: 2.30.1
    - node: 12.13.0
    - python: 2.7.16
    - python3: 3.8.2

    - Connected devices:
    - /dev/tty.usbmodem0009601386815: 000960138681 PCA10095

    Thanks for the help!

  • It got even worse. Now I can't even detect the usb serial port.I start to suspect the board is bad. How can I get a replacement? I bought it from DigiKey.

Related