Pok
Pok

Reputation: 63

programming nRF51822 and integrating it on a PCB

I have a basic firmware question. I am looking to program a nRF51822 IC and integrate it on my own PCB. The evaluation kit seems to already have the IC soldered on it. Is it a way I can only program the nRF51822 and getting it ready to use elsewhere?

Upvotes: 4

Views: 6924

Answers (3)

nemik
nemik

Reputation: 668

You don't need J-Link at all. Any STLinkv2 board will work, like STM32 dev boards. But even nicer are these cheap Chinese programmers: http://www.aliexpress.com/item/FREE-SHIPPING-ST-Link-V2-stlink-mini-STM8STM32-STLINK-simulator-download-programming-With-Cover/32247200104.html

All you need to do is connect the Vcc, Ground, SDIO, and SWDCLK lines from your board/chip to the programmer, so make sure those pins are broken out and easy to get to. There are some good instructions on how to do that here: https://github.com/RIOT-OS/RIOT/wiki/Board:-yunjia-nrf51822

I've built Linux workstations for workers on assembly lines to use with this method, and it just loops over and over for new boards. So they don't even need to touch the PC, they can just place a board on the jig or connect a header and it's all automatic.

Upvotes: 2

chwi
chwi

Reputation: 2802

Get yourself one of these J-LINK LITE CortexM:

enter image description here

and hook up your connection header like this to your microcontroller (SWDIO, SWCLK, VCC and GND are the only ones needed):

enter image description here.

Then, use Keil or nRFGo Studio to program your device.

Upvotes: 6

Morga
Morga

Reputation: 11

You will need a programming device, such as a Segger Jlink. The eval kit has an on-board Segger programmer on it (that big chip with the Segger sticker on it).

I'm working through this process myself at the moment. I read somewhere that some people were successful at 'hacking' the eval kit, to bring the SWDIO and SWCLK over to their custom board but that really isn't the right way to go about it. Instead, purchase an actual programmer and put a programming header on your custom circuit board.

While I am also still in the research phase here as well, it looks like there are 4-5 pins to connect from the programmer to your custom target board. The nRF documentation seems to be rather lacking in the definition of the programming setup, but look under the debugging category and take a look at Segger documentation as well.

If going into mass production there are ways to pre-program the chip before assembly, but I haven't had a chance to learn about that just yet.

Upvotes: 1

Related Questions