GPIO pin 40 on ESP32-S3 not working correctly as an output

MikeMyhre
Posts: 54
Joined: Sat Nov 05, 2022 3:32 am

GPIO pin 40 on ESP32-S3 not working correctly as an output

Postby MikeMyhre » Wed Aug 02, 2023 10:34 pm

The following code works:
gpio_reset_pin(GPIO40);
gpio_set_direction(GPIO40,GPIO_MODE_OUTPUT);
gpio_set_level(GPIO40,0);

By default the pin is MTDO according to the manual.
IO40 33 I/O/T MTDO, GPIO40, CLK_OUT2

When I use the gpio_reest_pin command, the output turns on momentarily which can't happen for my application.
If I omit the gpio_reset_pin command, it doesn't pulse the pin high momentarily but it doesn't always work (I assume it goes back to being a IOMUX peripherial).
I don't see any command to disable the peripherial mode in the mux and just be an output (one would think that configuring it as a GPIO output would do that).
Any ideas on how to control the pin as GPIO without having it turn on when I do it?
Thanks,
Mike

Who is online

Users browsing this forum: Baidu [Spider] and 80 guests