Page 1 of 1

ESP32-PICO-V3 IO20 error

Posted: Fri Sep 03, 2021 7:53 pm
by AG1702
I have an issue using ESP32-PICO-V3 IO20 (pin 27). When executing, terminal says:

E (317) gpio: gpio_set_direction(263): GPIO number error
E (327) gpio: gpio_set_level(215): GPIO output gpio_num error

Here's the simplest blink example I'm using.

Code: Select all

#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "sdkconfig.h"

#define LED 	GPIO_NUM_20
#define RET	500

void app_main(void)
{
    gpio_pad_select_gpio(LED);
    gpio_set_direction(LED, GPIO_MODE_OUTPUT);

    while(1)
    {
    	gpio_set_level(LED, 1);
        vTaskDelay(RET/portTICK_PERIOD_MS);

        gpio_set_level(LED, 0);
	vTaskDelay(RET/portTICK_PERIOD_MS);
    }
}
All other IO pins work fine.
Someone knows what's happening?

Re: ESP32-PICO-V3 IO20 error

Posted: Fri Sep 03, 2021 8:03 pm
by boarchuz
IO20 wasn't available on earlier packages, so it was considered invalid. Support was added in IDF very recently, so you'd have to pull in/copy the latest changes to use it:
https://github.com/espressif/esp-idf/co ... 21fd142b79

Re: ESP32-PICO-V3 IO20 error

Posted: Tue Sep 07, 2021 6:30 pm
by AG1702
SOLVED. Thank you very much.