I'm working with the Nrf52832 Dev Kit and the ble_uart_example. After flashing with the hex file and powering the Dev Kit, the on-board-LED starts to blink. Now I want to use an external LED connected to a GPIO to show if the Board is advertising(led blinking) or connected(led on). What changes in the software must be made that the GPIO with an external LED can be used as an indicator for advertising. I tried to change the pins in bsp_config.h but it wasn't successful.
The nRF52832DK Buttons and LEDs use the GPIOs from P0.13 to P0.20. Its definitions are in the <nRF5_SDK>\components\boards\pca10040.h. You can take a look.
Okay thanks. I changed the pin number to GPIO pin 22 to see if the external connected LED starts blinking for advertising but the external LED stays on the whole time. Do I have to change other parts in the code?
Code from pca10040.h
// LEDs definitions for PCA10040
#define LEDS_NUMBER 4
#define LED_START 17
#define LED_1 22
#define LED_2 18
#define LED_3 19
#define LED_4 20
#define LED_STOP 20
Could you modify #define LED_STOP 20 to 22? Please let me know this helps or not.
Yes, the blinking works. But when I connect the dev kit with my smartphone and the nRF Connect App the LED is off. Usually it should be on. After disconnecting the LED blinks correctly again.