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

How to undefined LEDs and Buttons in custom code?

Hi,

In my application, using BMD301 i have made one custom PCB. I am using SDK 12.0.0. In my PCB I have not used all the four LEDs. I have assigned p0.19 to the BSP_LED_0 which is required for advertising indication. all the Other BSP_LEDs i am not using . but the pins assigned to these on eval kit are used for different application. Does it make any difference?

Also I am getting some issues when i am using p0.20 for difference purpose on eval kit? D o we need to comment the definition of corresponding LEDs in pca10040. or is there any other method available apart from this.

  • In my custom PCB board I have assignes P0.20 as SPI clk for ADXL 362 acceleromter.

      #define ADXL_SCK              20
      #define ADXL_MOSI             0
      #define ADXL_MISO             1
      #define ADXL_CS               18
    

    But proper configuration is not happening. Same thing I tried on eval kit and I faced same issue. Then simply changed ADXL_SCK to 3 then SPI configurations worked fine.

    What is the issue with p0.20.?

  • Hi,

    You can either create your own board file, or modify an existing one in order to add support for your custom board in the BSP module. Take a look at this answer on how to create your own board file.

    You can start by modifying the LED definitions in pca10040.h board file to support only one LED:

    #define LEDS_NUMBER    1
    
    #define LED_START      19
    #define LED_1          19
    #define LED_STOP       19
    
    #define LEDS_ACTIVE_STATE 0
    
    #define LEDS_INV_MASK  LEDS_MASK
    
    #define LEDS_LIST { LED_1}
    
    #define BSP_LED_0      LED_1
    
Related