Page 1 of 1

ESP32C6-Strapping pin configuration

Posted: Thu Jan 11, 2024 6:28 am
by Lavanya20
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?

Re: ESP32C6-Strapping pin configuration

Posted: Thu Jan 11, 2024 7:27 am
by ESP_Sprite
You want to set the pin to GPIO_MODE_INPUT_OUTPUT instead.