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

Can I use some of the example code for nRF51822 on my custom board?

Hi, I am trying to code my nRF51822 on my custom board, however right now I'm having my doubt on using some of the example code provided in the SDK.

Essentially, I want to try sending a byte via SPI, but I'm not sure if I can copy some of the lines from "Board->nrf6310->spi_master_example->main.c" (found from nRF51 SDK zip file).

I'm unsure because these example codes seem to be aimed for boards that come with dev/eval kit. (it says nRF6310, whereas the chip itself is nRF51822)

Right now, these are my questions: [b]1. Which files can I use from nRF51 SDK for my nRF51822 on custom board? I assume that I can at least use the headers file in "nRF51822->Include". 2. Can I use some of the example code from nRF51 SDK for my nRF51822 on custom board?[/b]

I'm sorry if these questions seem silly, but I'm still new at programming microcontroller and there are so many document files to read, so this is very confusing for me. (I'm not sure about the soft devices either)

If only there is a step-by-step instruction on how to program nRF51822 for beginners...

  • FormerMember
    0 FormerMember

    Hello,

    nRF6310 is the motherboard to which the development kit is supposed to be connected. The examples in the nRF6310 folder are made to match the motherboard, meaning that the buttons and LED configurations in the examples matches the GPIOs for the buttons and LEDs on the motherboard.

    You can copy the example codes to your custom made board. The chips are the same in both cases, difference between the development kit and your board is what is connected to the GPIOs on the nRF51822 chip.

    Regards, Kristin

Related