Re: gpio pin configuration.

Marcus Shawcroft <marcus.shawcroft@...>

On 15 December 2016 at 19:21, Chuck Jordan <Chuck.Jordan(a)> wrote:
However that doesn't cover the scenario where the gpio pin is being used by another peripheral in the SOC and the gpio_pin_write() implementation is not in the loop.
Ummmm. If the power-up-reset state of any GPIO is "input", then no software is necessary. If this is NOT true, then on any given target, code should be putting UNUSED gpio pins to input as an initial startup mode as early as possible. If they do not, lots of power can be wasted if the other side is also driving it as an output. It can also be DANGEROUS I think -- almost like a short.
I'm not an expert in this area though ... so perhaps someone who is can chime in.
An example of the scenario above would be an nrf5 i2c driver that
needs to use the nrf5 gpio driver to put the two pins used for clock
and data into an open collector mode.


Join to automatically receive all group messages.