ESP32-S3 gpio_set_level() problem
Posted: Thu May 26, 2022 8:55 pm
I started a project for the ESP32-S3 using PlatformIO for Arduino (as they do not support IDF yet).
I am using the ESP32-S3-DevKitC-1 v1.0.
In that project I am using pin 41 tied to my scope to check performance on some functions which worked just fine.
pinMode (40, OUTPUT); // Set Up pin for Timing On scope
digitalWrite(40, LOW); // Signal start of function call
updateOLED(); // Function we are timing
digitalWrite(40, HIGH); // Signal end of call
I preferer to work in ESP-IDF as you get more control over things than in Arduino.
So I installed ESP_IDF v4.4.1 and copied files over and just had to tweak a few lines like above to be compatible with IDF.
gpio_set_direction(40, GPIO_MODE_OUTPUT); // Set Up pin for Timing On scope
gpio_set_level(40, LOW); // Signal start of function call
updateOLED(); // Function we are timing
gpio_set_level(40, HIGH); // Signal end of call
But I get nothing on the pin 40. I then tried 41 and still nothing. I then went back to platromIO, re-flashed and pin 40 worked fine, I then changed it to 41 and that worked fine as well.
AM I doing something wrong to which v4.4.1 does not work for pins higher than 32? Or should I have installed from the master branch when using ESP32-S3 ?
I am using the ESP32-S3-DevKitC-1 v1.0.
In that project I am using pin 41 tied to my scope to check performance on some functions which worked just fine.
pinMode (40, OUTPUT); // Set Up pin for Timing On scope
digitalWrite(40, LOW); // Signal start of function call
updateOLED(); // Function we are timing
digitalWrite(40, HIGH); // Signal end of call
I preferer to work in ESP-IDF as you get more control over things than in Arduino.
So I installed ESP_IDF v4.4.1 and copied files over and just had to tweak a few lines like above to be compatible with IDF.
gpio_set_direction(40, GPIO_MODE_OUTPUT); // Set Up pin for Timing On scope
gpio_set_level(40, LOW); // Signal start of function call
updateOLED(); // Function we are timing
gpio_set_level(40, HIGH); // Signal end of call
But I get nothing on the pin 40. I then tried 41 and still nothing. I then went back to platromIO, re-flashed and pin 40 worked fine, I then changed it to 41 and that worked fine as well.
AM I doing something wrong to which v4.4.1 does not work for pins higher than 32? Or should I have installed from the master branch when using ESP32-S3 ?