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

NRF51-DK programming custom board problem

I'm trying to program a nRF51822 custom board using Debug out pin P19 of NRF51-DK through Keil MDK, here is the problem I encounter:

To simplify I just use the simple blinky_s130_pca10028 project. First I compile and load the program to DK on board 51422 chip without problem. The LEDs were blinking.

Then I connected the custom board to NRF51-DK via Debug out P19 using a 10pin cable, but just use 4 wires which are EXT_VTG, EXT_SWIO, EXT_SWCLK, and GND.

Then I powered up the custom board with 3V voltage.

After that I clicked Load button in Keil, erase and program successfully! The strange thing is all the messages was the same like I programmed the on board 51422 chip (Target info:-Device: nRF51422_xxAC, VTarget = 3.300V), but I know it wasn't really loaded to the on board chip because the LEDs were keeping blinking during the flashing process. And if I disconnect the EXT_SWCLK wire from the custom board and Load again it shown a error message: No Cortex-M SW Device Found. Which means the DK is able to detect the custom board.
So I suppose the program was loaded to the external custom board. Unfortunate there was no signal output from the 51822 chip of the custom board , which means the program may not correctly loaded to the external 51822 chip. I verified all the connections and voltage, it's all good.

So I don't know if I missed something? If 51-DK programs the custom board, should the target info the same like I program the on board chip (such as Target info:Device and VTarget etc. ) ? I know the VTarget = 3.3V was not correct because the target board voltage should be 3V instead of 3.3V, and what the Device name it should show?

Many thanks for the help! I have been stuck here for couple of days!

  • Are you powering the custom board from the VDD pin of the nRF51 DK? The supply voltage of the nRF51 DK and the custom board must be identical, otherwise you will program the nRF51 DK and not the external custom board.

  • In DK user guide page 20 it says "Note: The voltage supported by external debugging/programming is 3.0 V", my custom board power supply is exactly 3V, while the VDD of DK is 2.85V. I have tried to use both power to the custom board but it's the same result. What makes me confuse is that the programming process and message is exactly the same for both internal chip (51422) and the external chip (51822). Here is the same message for both:

    Target info: Device: nRF51422_xxAC 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 Done. Programming Done. Verify OK. Application running ...

    So I don't know if it's correctly loaded to the custom board or not (the device info and voltage is not right). Or do I need to change code in Keil for the custom board? Thanks!

  • I just tested programming a nRF51 DK (nRF51422 QFAC ) with a nRF52 DK (nRF52832 QFAA ) and the correct device should show up when you flash the firmware, see below.

    Target info:
    ------------
    Device: nRF51422_xxAC
    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 Done.
    Programming Done.
    Verify OK.
    Application running ...
    Flash Load finished at 14:50:34
    

    Are you sure that your connections are correct? Please see this blogpost and confirm that you're connecting the pins correctly.

  • Thank you Bjorn! Tried a few more times, it suddenly worked! I didn't change anything, maybe there was bad connection somewhere. Now it's good, BT is running now. BTW, the message shown above is the same for programming the DK and custom board. Even if you are programming the 51822 chip, it still show the same Device and VTarget info above. Thanks again!

  • Glad to hear that you're able to flash the custom board :)

Related