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

SEGGER J-Link debugger/programmer for nRF52840

Hi,

I have developed some projects on nRF52840 DK pca10056.

I want to program/debug the nRF52840 chip (this chip)  with SEGGER J-Link debugger/programmer (this debugger).

So I have the following questions.

1- Is this the right debugger I have selected? Or any other suggestion?
2- Is there any connection diagram(nRF52840 chip--with--SEGGER J-Link debugger/programmer)? I have not found it.
3- I need this setup to program many devices. So any suggestions?

Thanks! 

Parents
  • Hello, I'd like to add to 's answer. This is for when you use P20 for programming and debugging an external device.

    1- Use P20 on the board and make the connections he provided,  (I will use DK term for the device that has a J-link which will be connected to the external device that will be programmed such as a dongle)(you don't need to power the device if it's a dongle).

    2- Build your application for proper device (nrf52840, 52840 dongle, 52833... etc.)

    3- go to location <your_workspace_path\your_application_folder\build\zephyr> where we'll need the zephyr.bin and zephyr.hex files.

    4- Open J-Flash Lite (I'm using V7.66a version). Choose device to be programmed > click OK > click three dots below the "Data File (bin / hex / ...)....." find the zephyr.bin path located in step 3. 

    5- Click Program Device

    6- Repeat step 4 for zephyr.hex

    7- Click Program Device

    8- it should work.

    You might ask," why do you program .bin and after that the .hex file, wouldn't the .hex just overwrite anyway?" Nope. Although sometimes just flashing the .hex file works, most of the time it did'nt for me and I don't know why. It was a coincidence that I've discovered this. But I'm guessing it's something to do with bootloader. .hex files don't start form address 0x0, but I've discovered that .bin files do. So overwriting them somehow makes it work. Hope it helps. Any technical explanation on why this works is appreciated.  

Reply
  • Hello, I'd like to add to 's answer. This is for when you use P20 for programming and debugging an external device.

    1- Use P20 on the board and make the connections he provided,  (I will use DK term for the device that has a J-link which will be connected to the external device that will be programmed such as a dongle)(you don't need to power the device if it's a dongle).

    2- Build your application for proper device (nrf52840, 52840 dongle, 52833... etc.)

    3- go to location <your_workspace_path\your_application_folder\build\zephyr> where we'll need the zephyr.bin and zephyr.hex files.

    4- Open J-Flash Lite (I'm using V7.66a version). Choose device to be programmed > click OK > click three dots below the "Data File (bin / hex / ...)....." find the zephyr.bin path located in step 3. 

    5- Click Program Device

    6- Repeat step 4 for zephyr.hex

    7- Click Program Device

    8- it should work.

    You might ask," why do you program .bin and after that the .hex file, wouldn't the .hex just overwrite anyway?" Nope. Although sometimes just flashing the .hex file works, most of the time it did'nt for me and I don't know why. It was a coincidence that I've discovered this. But I'm guessing it's something to do with bootloader. .hex files don't start form address 0x0, but I've discovered that .bin files do. So overwriting them somehow makes it work. Hope it helps. Any technical explanation on why this works is appreciated.  

Children
Related