Nordic nRF52840-DK Firmware is lost after power cycle

Hi,

I purchased some new nRF52840-DKs (PCA10056) from Digikey and loaded the default Nordic Bluetooth Low Energy code onto them, but it seems like every time I unplug the DK from my computer, the code seems to be lost and I have to load the code onto it again.  On older DKs, it seems like this was not the behavior, and I was able to load the default BLE code and unplug/plug-in my DK without the code getting erased automatically.  Is there any way I can get the same behavior on the new DK’s?

Steps to reproduce:

  • Configure switches for nRF52840-DK as follows:
    • Power set to ON, nRF Power source set to VDD, SW set to Default
  • Plug in nRF52840-DK into PC using USB
  • Run recovery using “nrfjprog --recover" in the command line
  • Open nRF Connect for Desktop v3.12.0
  • Open Bluetooth Low Energy App v4.0.0
  • Select the nRF52840-DK in the dropdown list
  • Wait for the programming message to pop up and then click Yes
  • After programming is complete, after a few seconds the DK shows up as being able to scan for Bluetooth devices
  • Close the Bluetooth Low Energy App
  • Unplug the DK from the PC
  • Wait a few seconds
  • Plug in the DK to the PC again
  • Open Bluetooth Low Energy App
  • Select the DK from the dropdown list
  • The programming pop-up shows up again.  I am expecting that the DK should still be programmed from last time and I should be able to scan for Bluetooth devices, but it seems the code did not stick

 

Other comments:

  • When I connect to this DK using J-Flash, it says that there is no valid license for J-Flash found on the on-board programmer:
  • Part Marking: N52840 QIAAF0 2134AG and N5340 QKAAD0 2145AM
  • Does not work on both SEGGER J-Link V7.60 and V7.80
  • The first log “2022-10-04T20_21_21.674Z-log” is right after the Bluetooth Low Energy App finishes programming the DK.  The second log “2022-10-04T20_23_01.470Z-log” is after unplugging the DK and connecting to the DK a second time.

Thanks,

Debbie

2022-10-04T20_21_21.674Z-log.txt

2022-10-04T20:23:01.927Z DEBUG Application data folder: C:\Users\dtray\AppData\Roaming\nrfconnect-bluetooth-low-energy\bundle
2022-10-04T20:23:02.014Z INFO Using nrf-device-lib-js version: 0.4.4
2022-10-04T20:23:02.014Z INFO Using nrf-device-lib version: 0.10.3
2022-10-04T20:23:02.014Z INFO Using nrfjprog DLL version: 10.15.1
2022-10-04T20:23:02.014Z INFO Using JLink version: JLink_V7.60e
2022-10-04T20:23:02.022Z DEBUG App pc-nrfconnect-ble v4.0.0 official
2022-10-04T20:23:02.023Z DEBUG App path: C:\Users\dtray\AppData\Local\Programs\nrfconnect-bluetooth-low-energy\resources\app.asar\resources/bundle/
2022-10-04T20:23:02.023Z DEBUG nRFConnect 4.0.0, required by the app is (^3.8.0)
2022-10-04T20:23:02.023Z DEBUG nRFConnect path: C:\Users\dtray\AppData\Local\Programs\nrfconnect-bluetooth-low-energy\resources\app.asar
2022-10-04T20:23:02.023Z DEBUG HomeDir: C:\Users\dtray
2022-10-04T20:23:02.023Z DEBUG TmpDir: C:\Users\dtray\AppData\Local\Temp
2022-10-04T20:23:02.028Z INFO Installed JLink version does not match the provided version (V7.58b)
2022-10-04T20:23:02.030Z INFO Updated list of uuids with data from https://github.com/NordicSemiconductor/bluetooth-numbers-database/tree/master/v1
2022-10-04T20:23:09.969Z INFO Selected device with s/n 001050272729
2022-10-04T20:23:09.978Z DEBUG Found matching firmware definition nrf52
2022-10-04T20:23:14.174Z INFO Device setup completed
2022-10-04T20:23:14.174Z INFO Getting information from J-Link debugger...
2022-10-04T20:23:14.174Z INFO Found device type: unknown. J-Link firmware: J-Link OB-nRF5340-NordicSemi compiled Dec  3 2021 15:46:49.

Parents
  • Hello

    I have the same DK, and I'm not seeing the behavior you're describing.

    When I plug in the DK the second time I do not have to program it.

    Looking at your second log I can not see the "Uploading image through JLink" line. Can you explain what's happening here? Do you not program it the second time?

    Best regards,

    Einar

  • Hi Einar,

    Yes that is correct, I did not program it the second time because I was expecting it to remember what I loaded last time.  Is there anything else I can try?

    Thanks,

    Debbie

  • Hi

    I do not believe the firmware on your DK is being erased, but rather that there is an issue with reading out what is programmed on your DK.

    Here are a couple things I would like you to test to narrow down the issue:

    I've included the zephyr blinky application compiled for nRF52840, could you try to flash this to your DK using nrfjprog?

    Whether the LED keeps blinking after power cycling will make it clearer if this is related to the DK or to nRF Connect for Desktop.

    3240.zephyr.hex

    You can also try to program the DK from a different computer.

    This could help clarify whether the issue is related to your desktop setup or the DK firmware.

    Best regards,

    Einar

  • Hi Einar,

    I performed the following commands using the nrfjprog command line on the DK:

    nrfjprog --family nrf52 --recover

    nrfjprog --family nrf52 --eraseall

    nrfjprog --family nrf52 --program "C:\Users\dtray\Downloads\3240.zephyr.hex" -chiperase --verify

    nrfjprog --family nrf52 --reset

    I verified that LED1 was blinking.  Then I power cycled the board using the on/off switch, and confirmed LED1 was still blinking.  I also power cycled the board by unplugging and plugging the USB connector and saw that LED1 was still blinking.  So it seems like the DK is able to successfully program using this method.

    I repeated the recover and eraseall commands using the command line on the same DK, and then I used the nRF Connect > Bluetooth Low Energy App to connect and program the DK.  I saw that it was able to search for Bluetooth devices, but after I power cycled the DK, the BLE app was asking to program the DK again.  I tried programming the same DK on another PC and I saw the same behavior.  So it seems like there is something wrong when I use the BLE app to program.  Are you able to provide the .hex file that is used when programming through the BLE app?  I could not find it online, but if you can provide it then I can check if programming that hex file through the commandline still works.

    Thanks,

    Debbie

  • One thing you could also try is to update the debugger firmware.

    You'll find the firmware here (interface MCU firmware):

    https://www.nordicsemi.com/Products/Development-hardware/nRF52840-DK/Download?lang=en#infotabs

    The DK will enter bootloader mode for the debug chip if you hold the reset button while powering up.

    You should then be able to drag and drop the binary file into a folder in Windows.

    -Einar

  • Hi Einar,

    I held the IF BOOT/RESET button on my DK while plugging in the USB cable to the PC.  I saw that a JLINK window popped up on the PC.  From there, I dragged in the .bin file.  The window disappeared and reappeared, but it contained a FAIL.TXT which states: "The currently active SWD interface does not support MSD drag and drop".  I tried looking online but couldn't find any solutions for this failure for the debugger.  Is there another way to program it?

    Thanks,

    Debbie

  • Hi again

    I now realized that the newer DK you have has a different debugger chip than the one I've been testing with.

    I tested again using a v3.0.0 nRF52840 DK with an nRF5340 debugger/interface MCU, and now I see the behavior you're describing.

    The issue is definitely caused by the interface MCU not detecting the firmware on the 52840, but exactly why I'm not sure.

    I've asked internally what you could do about this, and I'll get back to you once I know more.

    -Einar

Reply
  • Hi again

    I now realized that the newer DK you have has a different debugger chip than the one I've been testing with.

    I tested again using a v3.0.0 nRF52840 DK with an nRF5340 debugger/interface MCU, and now I see the behavior you're describing.

    The issue is definitely caused by the interface MCU not detecting the firmware on the 52840, but exactly why I'm not sure.

    I've asked internally what you could do about this, and I'll get back to you once I know more.

    -Einar

Children
Related