Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

LEDS_NUMBER and boards.c

There are some serious issues in the file "board.c" that relate to LEDS_NUMBER.

If I create a custom board with no LEDs then I set LEDS_NUMBER to in my custom boards,h. However this creates a number issues:

1. There are no routines defined for (eg) bsp_board_led_on() and this generates a compiler error. Perhaps an #else clause can be added that provides dummy routines.

2. The code to initialise the GPIO output voltage on nRF52840 is within the block defined by LEDS_NUMBER, therefore in a board with no LEDS this code would be missing. It should be moved.

Parents
  • Hi,

    Which SDK version are you using?

    1. I can't see any places in the SDK where the bsp_board_led_on() API is referenced without being guarded by a "#if LEDS_NUMBER > 0" check. Can you post your full build log showing where the errors occurs?

    2. The gpio_output_voltage_setup() function is only implemented for nRF52840 Dongle board, which should have LEDs defined. If you are creating a custom board and needs to change the GPIO voltage level, you can copy this function directly into your application and call it where it suits you.

    Note that nRF5 SDK is in maintenance mode and will only be updated if major issues/bugs are discovered.

    Best regards,
    Jørgen

Reply
  • Hi,

    Which SDK version are you using?

    1. I can't see any places in the SDK where the bsp_board_led_on() API is referenced without being guarded by a "#if LEDS_NUMBER > 0" check. Can you post your full build log showing where the errors occurs?

    2. The gpio_output_voltage_setup() function is only implemented for nRF52840 Dongle board, which should have LEDs defined. If you are creating a custom board and needs to change the GPIO voltage level, you can copy this function directly into your application and call it where it suits you.

    Note that nRF5 SDK is in maintenance mode and will only be updated if major issues/bugs are discovered.

    Best regards,
    Jørgen

Children
No Data
Related