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

how to blink led by using BSP function with gpio pin p0.2,p0.3,p0.4

Hello sir,

              I am using nrf52832 soc with customized board  having  gpio pin  with P0.2,P0.3 and P0.4 used for led blinking for different purposes.The function used for led blinking is BSP function .

When i change the pins in PCA10040.h  files from LED_1 17,LED_2 18,LED_3 19,LED_4 20 to as described below as :

#define LEDS_NUMBER 4

#define LED_START 3
#define LED_1 3
#define LED_2 4
#define LED_3 5
#define LED_4 6
#define LED_STOP 6  

Due to above following changes the led is not blinking .What changes are required so that the led should Blink properly.

Parents
  • Can it be that some of these pins are configurd as UART or SPIM pins? See pca10040.h that you may need to redefine pins that already used for pins 3-6.

    Kenneth

  • hello sir ,

                     Currently i am testing on the development kit board with redefining the pins as 

                  #define LED_START 2
                  #define LED_1 2
                  #define LED_2 3
                 #define LED_3 4
                 #define LED_4 5
                 #define LED_STOP 5  

      The other pins which are configured with same pins are changed which are spi and uart which are changed given the pin as p0.17 to p0. 20.Still i am not getting the led blinking when it goes  in advertise mode.By mistake i have given the start pin as p0.3 but actually it start from p0.2 to p0.5. currently i am testing on the development kit board by using BSP function if it properly working then i tried into my customized board.But my query we can change the LED_pin in development kit board  from P0.17 to P0.20 as P0.2 to P0.5 .The second question is how i can redefine the PCA10040.h so that it is compatible for the led pins i mention in development kit board

     

Reply
  • hello sir ,

                     Currently i am testing on the development kit board with redefining the pins as 

                  #define LED_START 2
                  #define LED_1 2
                  #define LED_2 3
                 #define LED_3 4
                 #define LED_4 5
                 #define LED_STOP 5  

      The other pins which are configured with same pins are changed which are spi and uart which are changed given the pin as p0.17 to p0. 20.Still i am not getting the led blinking when it goes  in advertise mode.By mistake i have given the start pin as p0.3 but actually it start from p0.2 to p0.5. currently i am testing on the development kit board by using BSP function if it properly working then i tried into my customized board.But my query we can change the LED_pin in development kit board  from P0.17 to P0.20 as P0.2 to P0.5 .The second question is how i can redefine the PCA10040.h so that it is compatible for the led pins i mention in development kit board

     

Children
Related