ESP32-PICO-V3 IO20 error

AG1702
Posts: 11
Joined: Mon Feb 01, 2021 7:07 pm

ESP32-PICO-V3 IO20 error

Postby AG1702 » Fri Sep 03, 2021 7:53 pm

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?
Attachments
Sin título.jpg
Sin título.jpg (166.15 KiB) Viewed 3489 times

boarchuz
Posts: 606
Joined: Tue Aug 21, 2018 5:28 am

Re: ESP32-PICO-V3 IO20 error

Postby boarchuz » Fri Sep 03, 2021 8:03 pm

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

AG1702
Posts: 11
Joined: Mon Feb 01, 2021 7:07 pm

Re: ESP32-PICO-V3 IO20 error

Postby AG1702 » Tue Sep 07, 2021 6:30 pm

SOLVED. Thank you very much.

Who is online

Users browsing this forum: No registered users and 72 guests