Change LED pin indicating BLE advertisement

Hi,

I want to change the LED pin that blinks to indicate BLE advertisement to pin 6. I have changed the LED_1 and LED_STOP in pca10040.h to 6:

I have also set NRF_LOG_BACKEND_UART_ENABLED in sdk_config.h to 0.

However, the LED only blinks 1 after initialization and then turns off until it BLE connects to my phone (then turns on). I want the LED to blink during the whole advertisement. Do you know why it blinks only once then stops? Are there any other places in the code that I should change to change the LED pin?

Thanks,

Han

Parents
  • Hi,

    I see from the configuration snippet that you are using nRF5 SDK.

    There are quite a few default indication states in nRF5 SDK, using the available LEDs on the DK (sometimes also combinations of multiple LEDs.) See BSP indication states. Trying to configure all four LEDs to the same pin may yield unexpected results. In order to change the pin used for the LED signalling advertising modes, you should only redefine LED_1.

    Please note that nRF5 SDK is our older SDK which is now in maintenance mode. For new projects, we recommend the newer nRF Connect SDK. See nRF Connect SDK and nRF5 SDK statement for details.

    Regards,
    Terje

Reply
  • Hi,

    I see from the configuration snippet that you are using nRF5 SDK.

    There are quite a few default indication states in nRF5 SDK, using the available LEDs on the DK (sometimes also combinations of multiple LEDs.) See BSP indication states. Trying to configure all four LEDs to the same pin may yield unexpected results. In order to change the pin used for the LED signalling advertising modes, you should only redefine LED_1.

    Please note that nRF5 SDK is our older SDK which is now in maintenance mode. For new projects, we recommend the newer nRF Connect SDK. See nRF Connect SDK and nRF5 SDK statement for details.

    Regards,
    Terje

Children
Related