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

Problem of GPIO configuration difference between nRF51822 and nRF52832

With nRF51822, I have a GPIO port configuration function as:

static __INLINE void nrf_gpio_cfg_output_S0D1(uint32_t pin_number)
{
     NRF_GPIO->PIN_CNF[pin_number] = (GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos)
                                            | (GPIO_PIN_CNF_DRIVE_S0D1 << GPIO_PIN_CNF_DRIVE_Pos)
                                            | (GPIO_PIN_CNF_PULL_Pullup << 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);
}

With this configuration, the same GPIO port can be used as input and output both. However, with the same configuration for nRF52832, the behaviour is difference.

Would you please help me to modify above configuration function for nRF52832, thus have the same effect as nRF51822?

Thanks a lot.

Related