Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GPIOTE in inout mode

Hi all,

I want to use gpiote module of nrf52832 in in_out mode.

This means I want to config a gpio pin as output in open-drain mode like other MCUs while this pin can also sense the bus if it goes high or low.

Can nrf52832 support this.

Parents Reply
  • Hi

    If the lib doesn't support it there is always the hardware registers ;)

    I tested it myself by configuring the pin directly through the PIN_CNF[n] register:

    NRF_P0->PIN_CNF[BSP_LED_0] = GPIO_PIN_CNF_DIR_Output         << GPIO_PIN_CNF_DIR_Pos     |
                                                               GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos |
                                                               GPIO_PIN_CNF_DRIVE_S0S1     << GPIO_PIN_CNF_DRIVE_Pos;

    Best regards
    Torbjørn

Children
Related