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

nRF52840 Preview DK program custom board issue

Hi,

I am trying to run/debug my code in the nRF52840 on my custom board. For that, I connect 4 signals from P20 to my board: VDD nRF to VDD, GND DETECT to GND, SWD IO to SWDIO, and SWD CLK to SWDCLK. I also short pins 2 & 3 of P20 (VDD nRF with VTG), and GND DETECT to the development kit board GND. I have soldered to short SB47. I am powering only the DK board from the USB.

When connecting the USB I see one of the LEDs on my custom board going on, then turning off. I have checked the voltages, and the custom board receives VDD=3 V and GND. CLK is to 0, and SWDIO to 3V.

Then I build and launch the code from my project in SEGGER, and I get this error:

Connecting ‘J-Link’ using ‘USB’
Connecting to target using SWD
Loaded C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 3.34a/bin/JLink_x64.dll
Firmware Version: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 12 2018 16:05:20
DLL Version: 6.30e
Hardware Version: V1.00
Target Voltage: 3.300
Device "NRF52840_XXAA" selected.
connect failed
Failed to connect to target.
No idcode detected.
Please check connection and Target Interface Type

The project I created by copying the simple uart example in \examples\peripheral\uart\pca10056\blank\ses to an equivalent relative path, then editing the project to have a different name, and edited it to look at pin definitions in custom_boad.h. 

I have also tried to program the chip in the DK as an external chip and I get the same result. For this, I soldered 2 cables to P25.2 and P25.4 and connected them to P20 signals SWDIO and SWD CLK. Since SB47 is soldered to short, it should be treated as if an external chip, but the output I get is exactly the same.

What I am missing? Perhaps I need to do or bypass some reset pin or something like that? I really cannot think of anything else to try. Thank you very much.

Parents
  • Hi,

     

    By shorting SB47, you are permanently applying power to header P19, not header P20.

    In order to use P20, you need to revert this short on SB47.

     

    The logical switch on P20 is the "VTG" pin. If you short this with the neighboring pin "VDD_NRF", you will enable P20 (but first; revert the above mention SB).

     

    Best regards,

    Håkon

  • Hi,

    That was it, now I am finally able to download my code to my board. I wonder if now I can do this while powering my board from the USB connector on my board. I see the interruptor SW9, with the USB option, and I would like to try to put it to USB and then connect my board to the USB, while connected to the evaluation board, and debug the functionality of my code. Would that be correct, or it would break something? If not, how can i do that? Thank you very much.

Reply
  • Hi,

    That was it, now I am finally able to download my code to my board. I wonder if now I can do this while powering my board from the USB connector on my board. I see the interruptor SW9, with the USB option, and I would like to try to put it to USB and then connect my board to the USB, while connected to the evaluation board, and debug the functionality of my code. Would that be correct, or it would break something? If not, how can i do that? Thank you very much.

Children
Related