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

JLink Firmware for nrf52840DK Shows Board as nrf52DK

I am currently developing on the nrf52840DK (Rev 1.1.1) using the mbed os.

To debug on the board using OpenOCD it is necessary to flash the JLink firmware for the board. This leads to a problem with mbed os, as the board is now shown as "NRF52_DK" when calling "mbed detect". Resulting in the problem, that some code cannot be properly compiled by mbed os, as the nrf52840DK has some additional flags for features that are not available on the nrf52DK, such as the complete CryptoCell 310 support.

Best regards

  • The IF firmware itself, which can be downloaded from here (extra drop-down meny for mbed IF), shall work for all nRF5x devices, regardless of the reported usb strings.

    Resulting in the problem, that some code cannot be properly compiled by mbed os

     This sounds like the project is configured for nrf52832 instead of nrf52840.

    According to this page:

    https://os.mbed.com/platforms/Nordic-nRF52840-DK/

    The nRF52840 is supported as a target (nrf52840_dk).

    I would recommend you check with the mbed community if you still have issues.

     

    Kind regards,

    Håkon

  • Sorry for the late answer.

    This sounds like the project is configured for nrf52832 instead of nrf52840.

    The project is configured for the nrf52840DK. If I am using ARM's DAPLink the board gets correctly recognised as NRF52840_DK and everything works without problems.

    The JLink fimware causes the problem at the moment. I double checked today, downloading and flashing the JLink firmware again. My nrf52840DK shows up as nrf52DK when calling "mbed detect". With ARM's DAPLink my nrf52840DK shows up correctly.

  • It sounds like there's an issue with the programming process here. Could you try to use nrfjprog instead?

     

    Kind regards,

    Håkon

  • Could you verify me to the command? I currently have only a single dev board, and I do not want to brick it by accident.

  • You should not use nrfjprog to program the on-board-debugger.

    In order to switch out the debugger IF (reprogram the Atmel IC near the USB plug) to either MBED or JLINK, you should hold down the "IF BOOT/RESET" while you power on the nRF52-DK.

    At this point, a drive will enumerate with the label "BOOTLOADER".

    Drag and drop the wanted .bin file over to this drive, wait 10 seconds, then power cycle your board again.

     

    To use nrfjprog, you need the above sequence to be loaded with the J-Link OB*.bin file.

    Once the above sequence is performed, and the jlink.bin file is successfully loaded, you can use nrfjprog like this:

    nrfjprog --program path\to\hex\file.hex --sectorerase -f nrf52 --reset

    Note: The .hex file should be a compiled program for nrf52, as you're targeting the nRF52 now.

     

    Kind regards,

    Håkon

1 2