I'm using ESP32C6 module for our application. Due to IO pin constrain I want to use GPIO 8(strapping pin) as IO for led toggle while running application. After module reset, in main I do below gpio configuration,
gpio_config_t io_conf = {};
io_conf.pin_bit_mask = 1ULL << GPIO_NUM_8;
io_conf.mode = GPIO_MODE_OUTPUT;
io_conf.intr_type = GPIO_INTR_DISABLE;
io_conf.pull_down_en = 0;
io_conf.pull_up_en = 0;
gpio_config(&io_conf);
printf("Value GPIO8 %d\n", gpio_get_level(GPIO_NUM_8));
gpio_set_level(GPIO_NUM_8, 1);
printf("Value after set high GPIO8 %d\n", gpio_get_level(GPIO_NUM_8));
The output is
Value GPIO8 0
Value after set high GPIO8 0
why the pin state is not changing?
Have to check/do any other configurations?
ESP32C6-Strapping pin configuration
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32C6-Strapping pin configuration
You want to set the pin to GPIO_MODE_INPUT_OUTPUT instead.
Who is online
Users browsing this forum: No registered users and 31 guests