When I run an infinite loop of NOP on the NRF52DK, the led's remain dark. But when I run an infinite loop of:
nrf_gpio_cfg(
pin,
NRF_GPIO_PIN_DIR_INPUT,
NRF_GPIO_PIN_INPUT_DISCONNECT,
NRF_GPIO_PIN_PULLDOWN, // !!! pulldown
NRF_GPIO_PIN_H0H1, // !!! high current
NRF_GPIO_PIN_NOSENSE);
}
(iterating on all the gpio pins) the led's glow very faintly. I expected the led's to remain dark, since the reset state of the pins is dark (loosely speaking) and the call to nrf_gpio_cfg doesn't change that.
Might it be a "break before make" problem in the HW implementation? Maybe SW must change pin configuration bits in a certain order?
This continues the discussion in my previous post devzone.nordicsemi.com/.../. If blindly configuring gpio pins DOES leak current to the physical pin, might it disrupt the LFXO if you configure a pin that is also a LFXO pin?