Page 1 of 1

Running low on GPIO

Posted: Thu Aug 31, 2023 10:58 am
by par.ahlund
Hi
Not long ago I started a project related to collecting and controlling other electronics from an ESP32-S2 Development board from Espressif.
Now I am running low on GPIO since I have used up GPIO1-GPIO20, GPIO33-GPIO38 and still need 2 more IOs to be used as binary inputs.
My choice of IO's has followed https://www.studiopieters.nl/esp32-s2-pinout/ with one exception.
Initially, my last two IO's used GPIO43 and GPIO44 but these seem to be used up by the serial interface.
The pin recommendation on the linked webpage marks 43 and 44 as green and fine to use but configured as inputs the uploding of code will not since they are used for serial communication.

So now I face the trick to move these IO's and since I know that I will not ever use JTAG my assumption was that I could move them to GPIO39 and GPIO40.
But out of the box those IO's do not work properly and just gives me zero as result when I do digitalRead(pin). Other pins work like a charm.
Question: Can 39 and 40 do the trick acting as inputs for digital signals if I do NOT intend to use JTAG?
I started to read a bit about Efuses, do I have to use Efuse settings to activate these ports for normal input operation?
If so, is there any "documentation for dummies" related to this which makes it easy to handle and can be recommended.
So far I found that there are some settings related to "disable JTAG" but at present, I do not know if disabling JTAG is a must to make the GPIOs work as simple GPIOs.
Please advise! Thank you!/Pär

Re: Running low on GPIO

Posted: Fri Sep 01, 2023 1:50 am
by ESP_Sprite
Those pins work as GPIOs, but you need to configure them as such first. Did you call a pinMode() or something to do that?

Re: Running low on GPIO

Posted: Fri Sep 01, 2023 5:39 am
by par.ahlund
Well.....
This thread should be buried and forgotten for time and eternity.
This morning I realized that when I had problems, I put in fake values for the inputs that didn't work.
When I then changed the GPIO, I had forgotten about my "hard coding" and of course the value was stuck to "0".
The whole problem statement is a non-problem which I have created myself.