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

transfert program using nRF USB port for nRF52840 DK

Hello,

Is it possible to transfer a program using the "nRF USB" on the nRF52840 DK (the on next to the 4 push bottoms) ? Until now, I was transferring the code with the other usb port (the one above the button cell) and it was ok. I want to use the other nRF USB port because it is connected directly to the nRF52840 and not through the pca10056.

the classical command : nrfjprog -f NRF52 --reset

results to ERROR: There is no debugger connected to the PC

If I want to design my own PCB, what should I do to transfer my code to the nRF52 chip ?

Thank you very much for the help, Swip

Parents
  • There is no bootloader which would serve that USB port on nRF52840 by default. But if you write some and load it first over SWD ("the other USB" if you want;) Then subsequent FW upload might be performed by any applicative way you have in your original FW including USB.

    (I guess you understand chicken and egg problem here, right? The only native way how to talk to "empty" nRF5x chip is SWD debugging/programming wires and protocol, nothing else).

Reply
  • There is no bootloader which would serve that USB port on nRF52840 by default. But if you write some and load it first over SWD ("the other USB" if you want;) Then subsequent FW upload might be performed by any applicative way you have in your original FW including USB.

    (I guess you understand chicken and egg problem here, right? The only native way how to talk to "empty" nRF5x chip is SWD debugging/programming wires and protocol, nothing else).

Children
  • Thank you for the general answer. What is FW ? and Can you be more specific on how to do this please ?

  • FW means firmware (aka your application binary). And I don't think I can be any more specific then what Sigur suggested above. You got it in principle (as you have the correct sequence in your comment above) so now just do it. Just make sure that you wire P19 or P20 correctly (or any similar equivalent on any other SWD flashing board you will decide to use, it doesn't need to be SEGGER J-Link), it's not just about power, ground and two SWD wires, you typically need to ground and power other pins as well. Luckily there are so many guidelines here on the forum and on the internet that you should always find good help.

Related