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

nRF9160-DK: How to reconfigure or release LED & BTN GPIOs?

Hi,

with regard to this document (https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf91_dk%2FUG%2Fnrf91_DK%2Fif_connector.html)

I am trying to release and reconfigure the by-default configured LED and button GPIOs to use them for my own purpose.

So my question is, how can I release or change the by-default configured GPIOs?

Kind regards

  • Hi!

    This will require changing the board controller firmware of the nRF52840 on the nRF9160DK so that it routes to the desired pins instead of the LEDs, buttons and switches. You can follow these steps to do that easily:
    1. Navigate to/open the "hello_world" sample in Zephyr (for the board nrf9160dk_nrf52840).
    2. Add the following configurations to the prj.conf of the project:

    CONFIG_BOARD_NRF9160DK_LED0_ARDUINO=y
    CONFIG_BOARD_NRF9160DK_LED1_ARDUINO=y
    CONFIG_BOARD_NRF9160DK_LED2_ARDUINO=y
    CONFIG_BOARD_NRF9160DK_LED3_ARDUINO=y
    
    CONFIG_BOARD_NRF9160DK_BUTTON0_ARDUINO=y
    CONFIG_BOARD_NRF9160DK_BUTTON1_ARDUINO=y
    CONFIG_BOARD_NRF9160DK_SWITCH0_ARDUINO=y
    CONFIG_BOARD_NRF9160DK_SWITCH1_ARDUINO=y

    3. Build the project for nrf9160dk_nrf52840

    4. Set SW5 of the DK to "nRF52" and flash the application.

    This should make the GPIO available for use.

    Best regards,
    Carl Richard

  • Hi Carl,

    thanks for your response. Now everything works as desired.

Related