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

NRF 51822 softdevice programming and blinking LED

I have NRF51822 softdevice, STM link v2 for flashing, segger embedded studio and nrf SDK. I have seen some videos on youtube on how to flash nrf softdevice using ST link. The softdevice already has a code and after powering it, I can see it on nrf app.

What I want is to program softdevice and connect one of its pins to LED and blink it through app. nrf blinky project is there in the examples but I am not sure which pin to connect the LED. 

In the youtube examples, I have seen that softdevice is mounted on the motherboard and an LED in the board start blinking after sending some command from app. But how can I do that without the motherboard or nrf51dk board.

Parents
  • Hi,

    Firstly, when we talk about "Softdevice" in Nordic we refer to the RF firmware you need to flash in the microcontroller before your application in order to use the RF properties. See https://devzone.nordicsemi.com/f/nordic-q-a/34519/what-is-a-soft-device

    I think you are asking about how to flash your nRF51822 chip/microcontroller with the Blinky example. For nRF51822 you need to use nRF5 SDK v12.3.0 which is the latest with support for nRF51822. This SDK has an experimental blinky example which you can find inside SDK_folder/examples/ble_peripheral/experimental_app_blinky/pca10028/s130

    If you open the source code of the example you will see that the LED used for blinking is defined as:

    #define BSP_BOARD_LED_2 2

    LED 2 is defined in pca10028.h as pin P0.22

    // LEDs definitions for PCA10028
    #define LEDS_NUMBER    4
    
    #define LED_START      21
    #define LED_1          21
    #define LED_2          22
    #define LED_3          23
    #define LED_4          24
    #define LED_STOP       24

    So try to connect you LED to P0.22 in the nRF51822.

    Best regards,

    Marjeris

Reply
  • Hi,

    Firstly, when we talk about "Softdevice" in Nordic we refer to the RF firmware you need to flash in the microcontroller before your application in order to use the RF properties. See https://devzone.nordicsemi.com/f/nordic-q-a/34519/what-is-a-soft-device

    I think you are asking about how to flash your nRF51822 chip/microcontroller with the Blinky example. For nRF51822 you need to use nRF5 SDK v12.3.0 which is the latest with support for nRF51822. This SDK has an experimental blinky example which you can find inside SDK_folder/examples/ble_peripheral/experimental_app_blinky/pca10028/s130

    If you open the source code of the example you will see that the LED used for blinking is defined as:

    #define BSP_BOARD_LED_2 2

    LED 2 is defined in pca10028.h as pin P0.22

    // LEDs definitions for PCA10028
    #define LEDS_NUMBER    4
    
    #define LED_START      21
    #define LED_1          21
    #define LED_2          22
    #define LED_3          23
    #define LED_4          24
    #define LED_STOP       24

    So try to connect you LED to P0.22 in the nRF51822.

    Best regards,

    Marjeris

Children
No Data
Related