How to set GPIO42 on ESP32-S3 as normal GPIO output?

Pixellord
Posts: 13
Joined: Wed Feb 15, 2023 8:58 am

How to set GPIO42 on ESP32-S3 as normal GPIO output?

Postby Pixellord » Wed Feb 15, 2023 9:10 am

Hi,

I am not able to configure the pin IO42 on my ESP32-S3 (ESPRE-S3-DevKitC-1 v1.6) as a normal GPIO output, with the following code:

[Codebox]
gpio_set_direction(GPIO_NUM_42, GPIO_MODE_OUTPUT);
gpio_set_level(GPIO_NUM_42, 1);
[/Codebox]

I know from the datasheet that this PIN is used for MTMS. How can I configure it as a normal GPIO?

I also know for GPIO 19 and 20, I need to disable USB-JTAG so that I can use them as normal GPIO? Is it similiar for pin GPIO42? How should I find such information?

Thanks

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

Re: How to set GPIO42 on ESP32-S3 as normal GPIO output?

Postby ESP_Sprite » Thu Feb 16, 2023 3:54 am

Either use gpio_config(), or call gpio_reset() on the pin before your code.

Who is online

Users browsing this forum: No registered users and 61 guests