atomic14 / esp32-s3-pinouts

ESP32-S3 Pinout Quick Guide
Creative Commons Attribution Share Alike 4.0 International
244 stars 20 forks source link

More info on GPIOs 33, 34 #26

Open trip5 opened 1 month ago

trip5 commented 1 month ago

Not sure if this applies to all ESP32-S3s since I only have the ESP32-S3-WROOM-1-N16R8 to work with and I've already lost so much time to this puzzle... I'm glad I found your Github because it seems the only good ESP32-S3 page around!

I'm working on porting ESP32Radio-V2 to run on the ESP32-S3 and I discovered something interesting... if GPIOs 33 and 34 are allowed to be probed during this loop (already excluded 0, 22-32, 35, 36, 37, 43, 44, 46):

  for ( i = 0 ; (pinnr = progpin[i].gpio) >= 0 ; i++ )   // Check programmable input pins
  {
    pinMode ( pinnr, INPUT_PULLUP ) ;                    // Input for control button
    vTaskDelay ( 10 / portTICK_PERIOD_MS ) ;
    if ( ( progpin[i].cur = digitalRead ( pinnr ) ) == HIGH )
    {
      p = "HIGH" ;
    }
    else
    {
      p = "LOW, probably no PULL-UP" ;                   // No Pull-up
    }
    ESP_LOGI ( TAG, "GPIO%d is %s", pinnr, p ) ;
  }
  vTaskDelay ( 10 / portTICK_PERIOD_MS ) ;

At this stage:

    WiFi.disconnect() ;                                  // After restart router could still
    vTaskDelay ( 500 / portTICK_PERIOD_MS ) ;            //   keep old connection
    WiFi.mode ( WIFI_STA ) ;                             // This ESP is a station

I get a crash:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x8 (TG1WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40377fe5
  #0  0x40377fe5 in panicHandler at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/port/panic_handler.c:217

I didn't even think to disable them (like I did with other pins as listed above) because I thought they might be exposed on other S3 boards. But now that I triple-checked your table, I can see there's just no documentation on them. So, whatever GPIOs 33 & 34 do , they can't be allowed to be set as input. They cause a crash on WiFi.mode ( WIFI_STA ) ;.

Sidenote that 22-25 probe fine but they do display "Invalid Pin" as an error message. Probably 35-37 also probe fine but I haven't tested.