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
Using GPIO 2 and GPIO 25 not being able to be controlled.
-
- Posts: 10
- Joined: Thu Mar 05, 2020 1:24 pm
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: Using GPIO 2 and GPIO 25 not being able to be controlled.
Can you post that code?
-
- Posts: 10
- Joined: Thu Mar 05, 2020 1:24 pm
Re: Using GPIO 2 and GPIO 25 not being able to be controlled.
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
//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
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: Using GPIO 2 and GPIO 25 not being able to be controlled.
That code looks decent enough. What specific hardware are you using?
-
- Posts: 10
- Joined: Thu Mar 05, 2020 1:24 pm
Re: Using GPIO 2 and GPIO 25 not being able to be controlled.
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.
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.
Who is online
Users browsing this forum: No registered users and 43 guests