ESP32-S2 - GPIO 39 not working as ouput?

pppTec
Posts: 6
Joined: Sun Apr 16, 2023 12:48 pm

ESP32-S2 - GPIO 39 not working as ouput?

Postby pppTec » Sun Apr 16, 2023 12:52 pm

I'm trying to use GPIO 39 as an output to drive an LED. I know on the ESP32 WROOM that's not possible, but it should be possible on the ESP32-S2. However, the output remains low.

gpio_set_direction(39, GPIO_MODE_OUTPUT);
gpio_set_level(39, HIGH);

What can I do? Is it conflicting with jtag (since IO39 is shared with the MTCK jtag function)? If so, how do I disable this?

ESP_Sprite
Posts: 9577
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-S2 - GPIO 39 not working as ouput?

Postby ESP_Sprite » Mon Apr 17, 2023 1:38 am

Yes, it probably is configured by default to JTAG. Use gpio_reset() to reconfigure it to a plain old GPIO.

pppTec
Posts: 6
Joined: Sun Apr 16, 2023 12:48 pm

Re: ESP32-S2 - GPIO 39 not working as ouput?

Postby pppTec » Fri Apr 21, 2023 8:01 am

That worked! Many thanks!

Who is online

Users browsing this forum: No registered users and 105 guests