Page 1 of 1

ESP32 GPIO25 and GPIO26 as standard Output

Posted: Tue Feb 05, 2019 10:07 pm
by maxl_1989
Hello

i already have spent a lot of hours to find out how to set the GPIO25 as output.
i have tried a lot of things but nothing work for me!

This example code work for me to set the GPIO_NUM_33 to Output but not for the GPIO_NUM_25.
gpio_config_t io_conf;
io_conf.intr_type = GPIO_INTR_DISABLE;
io_conf.mode = GPIO_MODE_OUTPUT;
io_conf.pin_bit_mask = (1ULL << GPIO_NUM_25);
io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
io_conf.pull_up_en = GPIO_PULLUP_DISABLE;
gpio_config(&io_conf);
gpio_set_level(GPIO_NUM_25, 1);

Can anybody please post me an example code how to set the GPIO25 output.
I dont wont to use the gpios in rtc mode, i want to use it in normal GPIO mode.

Thanks in advance!
best regards,
Markus

Re: ESP32 GPIO25 and GPIO26 as standard Output

Posted: Wed Feb 06, 2019 2:47 pm
by permal
I do it like this for all my outputs: https://github.com/PerMalmberg/Smooth/b ... ut.cpp#L17

I don't see a reason you'd have issues with GPIO 25, it's not a strapping pin. What module are you using, and what is the actual problem?

Re: ESP32 GPIO25 and GPIO26 as standard Output

Posted: Wed Feb 06, 2019 3:07 pm
by maxl_1989
i use a esp32-wroom-32 module.
my problem is, i can't set an output level.
i think the GPIO25 is default configured to DAC, so is it enought when i only do the gpio_config(&config) to set it as normal output gpio?

Re: ESP32 GPIO25 and GPIO26 as standard Output

Posted: Thu Feb 07, 2019 5:13 am
by ESP_Sprite
Unless you're specifically using I2S-related calls to configure these pins as a DAC, they're normal GPIOs.

Re: ESP32 GPIO25 and GPIO26 as standard Output

Posted: Thu Feb 07, 2019 7:56 am
by permal
maxl_1989 wrote: i use a esp32-wroom-32 module.
my problem is, i can't set an output level.
Is the call returning an error or don't you get the desired voltage on the pin? Do you have a schematic? Could it be that something is pulling it low hard?