I need to program the nrf51 controller directly from PC. How to connect nRF51822 controller from PC through UART/SWD pins to program.
I need to program the nrf51 controller directly from PC. How to connect nRF51822 controller from PC through UART/SWD pins to program.
Hi,
See the debug out section of the nRF51 DK User Guide. On either P20 or P19 you need to connect
SWDIO->SWDIO
SWDCLK->SWDCLK
VDDTG->VDD
GNDDETECT->GND
Note that you need to power your custom board, VDDTG does not supply it.
Best regards,
Andreas
OK thank you...but i am not using the DK board..i have the nrf controller on my pcb..i have taken out the swdio and swdclk pins to the connector along with the uart pins..kindly help me with how to connect these pins from the PC.
Hi,
I am not quite sure I understand what you mean, but if you have a nRF51-DK you have all that you need to program/debug your nRF51822 board, and the nRF51822 IC that sits on the nRF51822. Some slight modifications might be needed on the DK in order to have the interface MCU communicate with the external nRF51822 over UART.
The principle for both programming a nRF51822, and communicating with a nRF51822 over UART is the same, regardless if it is your custom PCB or a nRF51-DK. See this blog post for details. The difference is that on the DK, UART and SWD(for programming/debug) lines are hard-wired to the nRF51822 that is on the DK itself. If that NRF51822 sits in parallel with your custom board nRF51822 then the communication will be disrupted.
Best regards,
Andreas
But for mass production we need to program nRF51 on our PCB individually. I want to know how to connect, by using DK board can we program the controller which is in our PCB..kindly help us with this.
Hi,
For production programming you need a production programmer, the DK debugger license only covers use during development. The connection towards your board will be the same though, it will just be a different programmer instead of a DK.
You might find this getting started guide useful.
Best regards,
Andreas
Ok thank you..one more thing i need to know which all pins i need to take out from the nRF51 controller in order to program with these programmers.
Hi,
The programmer needs SWD, SWDIO, VDD and GND, no matter which one you use.
Also there are some de-facto standard connectors for this that might be interesting, which all incorporate the needed signals. See as an example J-link needle adapter and 9-pin cortex-M connector.
Best regards,
Andreas
Hi,
The programmer needs SWD, SWDIO, VDD and GND, no matter which one you use.
Also there are some de-facto standard connectors for this that might be interesting, which all incorporate the needed signals. See as an example J-link needle adapter and 9-pin cortex-M connector.
Best regards,
Andreas