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

Programming nRF51822 on a custom board using nRF52840 DK

Hello,

Is it possible to program nRF51822 with nRF52DK (PCA10056) ?

Currently I am trying to program my custom beacon (nRF51822) connected via SWD P20 header. I am using SDK 12.3.0 and Keil uVision 5.  I have tried to upload radio_test example from the sdk (pca10056) to my nRF51822 but I've been having " Flash Download Failed " error in build output in Keil. I've read that this may occur due to the fact that it's programming the wrong sector in memory (Soft Device) . How can I solve my problem? Below I am pasting the build output

Target info:
------------
Device: nRF52840_xxAA
VTarget = 3.300V
State of Pins:
TCK: 0, TDI: 1, TDO: 1, TMS: 1, TRES: 1, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints:          2
JTAG speed: 1000 kHz
 
Erase Failed!
Error: Flash Download failed  -  "Cortex-M4"

Should I change the device to nRF51822?

Parents
  • Hello,

    If your target info reads "Device: nRF52840_xxAA" it seems like the wiring is not done correctly.

    How have you connected the pins on P20?

    The pins you need to connect from P20 are VTG, SWDIO, SWDCLK and GND DETECT.

    SWDIO and GND DETECT are ok, as they can be connected directly, but remember that VTG and GND DETECT does not provide VDD to the external chip. They are used to check that the board is powered. You can power the device with an external battery, or with VDD and GND from the DK, and then connect VTG and GND DETECT to check that the board is actually powered. Once these pins detect a voltage on the external chip, it should switch from programming the internal nRF52840 to programming the nRF51 chip.

     

    Best regards,

    Edvin

Reply
  • Hello,

    If your target info reads "Device: nRF52840_xxAA" it seems like the wiring is not done correctly.

    How have you connected the pins on P20?

    The pins you need to connect from P20 are VTG, SWDIO, SWDCLK and GND DETECT.

    SWDIO and GND DETECT are ok, as they can be connected directly, but remember that VTG and GND DETECT does not provide VDD to the external chip. They are used to check that the board is powered. You can power the device with an external battery, or with VDD and GND from the DK, and then connect VTG and GND DETECT to check that the board is actually powered. Once these pins detect a voltage on the external chip, it should switch from programming the internal nRF52840 to programming the nRF51 chip.

     

    Best regards,

    Edvin

Children
No Data
Related