This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error when programming a custom board using nRF52-DK

Dear colleagues,

I am trying to erase / program the custom board ( with nRF52832 SoC installed) using nRF52-DK. The setup looks like that:

nRF52-DK Custom / External Board

VDD ------+-------------> VDD

VTG ----+/

GND ------------------------> GND

GND DETECT -----/

SWD IO -----------------> SWD IO

SWD CLK ----------------> SWD CLK

image description

As the picture shows, the custom board nRF52-DK is powered from USB, and the custom board is powered from the nRF52-DK. The voltage on VDD (P20), VTG (P20), and external board is 2.86V. The voltage on SWDCLC and SWDIO (P20) is 2.63V.

When I try to use nRFGO, the program just reloads whenever I click on motherboard's name. When I try to use nrfjprog, it shows the following error in log file:

image description

When I try to connect using JLinkExe, it shows the error:

image description

The schematic of the custom board is represented on the picture bellow: image description

I will appreciate any help!

P.S. programming the nRF52-DK (without custom board) works just fine.

UPDATE: when I power the custom board from the external power supply:

  1. custom board and DK not connected:
  • voltage at DK: VDD - 2.88V, VTG - 0, SWDIO-2.65V, SWDCLC-2.65V
  • voltage at custom board: VDD - 3.26V, SWDIO-3.21V, SWDCLC-0V
  1. custom board and DK are connected

nRF52-DK Custom / External Board

VTG ------+-------------> VDD

GND ------------------------> GND

GND DETECT -----/

SWD IO -----------------> SWD IO

SWD CLK ----------------> SWD CLK

image description

  • VTG - 3.26V, SWDIO: 3.30V, SWDCLC - 0.52V on both
  • if I disconnect SWDCLCs, when SWDCLC at DK is 3.56V, at custom board - 0V
  • if I disconnect SWDIOS, when SWDIO at DK is 3.56V, at custom board - 3.21V

The setup was tested with another nRF52-DK and it also did not work, so DK is not the problem.

The closer photo of how the chip is mounted is attached: DSC00364.png

  • Recovery command shows the same error as erase or program: "JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1. JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102."

    Do you have any ideas what may cause this HW problem? May it be caused by broken nrf52832 or X1? Or may it be due to low voltage (less than 3V) on DK and custom board?

  • Yes, it could be caused by strange voltage levels you are observing. To be honest I've never seen the case where would nRF5x DK powered from 5V USB fail to provide 3V3 to external low-power MCU like this. Are you sure you power it from the right PINs on DK board? I'm using VDD nRF from P20 or some of VDD PINs on P1 header, it never gave me below 3V...

  • It also seems strange for me, because according to nRF52 DK specs, "The 5 V from the USB is regulated down to 3.3 V". In order to measure voltage on the DK I connect voltmeter to VDD nRF (P20) and any ground on board, is it correct way of measuring voltage? Right not it shows 2.87V

  • Yes, you are measuring it correctly. Hard to say if it's voltmeter or weak USB power source or simply your DK board doesn't provide 3V3. As control measurement you can use 5V PIN on P1 or other PINs on the board, but anyway, even with 2.8V it should work. What about to power it through 12V on your target board and then just link VTG to 3V3 on target + GND it to nRF52 DK? That might help to be sure that power lines aren't the problem...

  • Thank you for your suggestion. Measurement at 5V PIN shows 4.99V.

Related