Page 1 of 1

when can a gpio be neither output or input enabled?

Posted: Thu Jan 28, 2021 5:27 am
by skibbidy
So I'm certain this is going to spawn more questions for me, but when im configuring GPIO, the last pin configured seems to not be set right.
Below is the output. Note it is not an error but just the console output. There are many other pins configured as part of the same bitmask to be an output, however this is the only one and always the last to be configured that results in neither an "InputEn" or "OutputEn".

I (3179) gpio: GPIO[15]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0

I am trying to implement the HAL here https://github.com/andpp/BMLite_Nordic for the esp32. the pin is the SPI_CS pin, however that does not seem to matter.

What cases can result in a pin being configured but unset as an input or output? is this normal?

thanks,
S

Re: when can a gpio be neither output or input enabled?

Posted: Thu Jan 28, 2021 9:25 am
by ESP_Sprite
From what I can tell, it depends on the mode flag you pass to gpio_config. If that neither has the input nor the output flag, the pin is effectively disabled. I can't really say more without looking at your code.