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

Input buffer connected in nrf_gpio_cfg_output() of the SDK

My understanding so far is that the input buffer of GPIO is disconnected by default and we can keep it disconnected for saving power when the pin is configured as output. Is there a reason why nrf_gpio_cfg_output() in the latest SDK connects the input buffer while configuring the pin as output? Here's the code for reference:

static __INLINE void nrf_gpio_cfg_output(uint32_t pin_number) { NRF_GPIO->PIN_CNF[pin_number] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos) | (GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos) | (GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos) | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos) | (GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos); }

Thanks in advance!

Ronnie

Related