Page 1 of 1

Using GPIO 2 and GPIO 25 not being able to be controlled.

Posted: Tue Sep 26, 2023 4:51 am
by agatrost1620
I have tested several different gpios with my code and able to drive them high or low. But when I set up GPIO 2 and GPIO 25 to test for driving, they remain low. Any help to get these 2 pins to work would be appreciated.

Thank you in advance

Re: Using GPIO 2 and GPIO 25 not being able to be controlled.

Posted: Tue Sep 26, 2023 6:11 am
by ESP_Sprite
Can you post that code?

Re: Using GPIO 2 and GPIO 25 not being able to be controlled.

Posted: Tue Sep 26, 2023 12:32 pm
by agatrost1620
I can post snippets of the code:
//The #defines are actually set up into typedefs to control other GPIOs, that are working, 2, and 25 are 2 that I found are not controlled through this code.

#define GPIO GPIO_NUM_2 // or whatever gpio to test
#define GPIO_MASK (1ULL << GPIO)

gpio_config_t config =
{
.intr_type = GPIO_INTR_DISABLE,
.mode = GPIO_MODE_OUTPUT,
.pin_bit_mask = GPIO_MASK,
.pull_down_en = 0,
.pull_up_en = 0,
};
gpio_set_level(GPIO, 1);

I can change the value of the gpio set level and monitor it on my Saleae. I do get on the output:
I (706) gpio: GPIO[2]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (716) gpio: GPIO[25]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0

Re: Using GPIO 2 and GPIO 25 not being able to be controlled.

Posted: Wed Sep 27, 2023 1:35 am
by ESP_Sprite
That code looks decent enough. What specific hardware are you using?

Re: Using GPIO 2 and GPIO 25 not being able to be controlled.

Posted: Wed Sep 27, 2023 2:55 pm
by agatrost1620
Thank you,
The issue has been resolved. I was working with the esp32 WROOM single antennae on a proprietary board, and went to a esp32 WROOM dual antennae eval board to test the signals. Upon further investigation this is expected operation of the 2 boards. On the single antennae board, the gpio do work. The issue was understanding the device I was trying to bit bang.