Serial port on Metro ESP32-S2 Express

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
simoniceberg
 
Posts: 1
Joined: Wed Aug 03, 2022 5:23 am

Serial port on Metro ESP32-S2 Express

Post by simoniceberg »

Hi,

I have been programming for Metro ESP32-S2 Express using ESP-IDF with PlatformIO. Contrary to the other ESP32 board I have (ESP32-DevKitC V4), after uploading the serial port disappears, making it difficult to monitor the output from the chip itself.

I have tried this code snippet:

Code: Select all

uart_config_t uart_config = {
        .baud_rate = 115200,
        .data_bits = UART_DATA_8_BITS,
        .parity    = UART_PARITY_DISABLE,
        .stop_bits = UART_STOP_BITS_1,
        .flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
    };
int intr_alloc_flags = 0;
QueueHandle_t uart_queue;
ESP_ERROR_CHECK(uart_driver_install(0, 1024, 1024, 10, &uart_queue, intr_alloc_flags));
ESP_ERROR_CHECK(uart_param_config(0, &uart_config));
ESP_ERROR_CHECK(uart_set_pin(0, 1, 3, -1, -1));
in an attempt to reopen the port used for uploading. However it doesn't show up in the monitor.

Thanks,
Simon

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Serial port on Metro ESP32-S2 Express

Post by mikeysklar »

Two common options to get the serial console are:

1) press the reset button on the Metro ESP32-S2 so the code restarts and the device shows back up so you can pickup a console.

2) On the Arduino IDE a work around is to selecrt the USB Mode: Hardware CDC/JTAG from the Tools menu. This is known to work with the ESP32-S3, but I suspect will also work with the ESP32-S2.

https://github.com/espressif/arduino-esp32/issues/6762

Locked
Please be positive and constructive with your questions and comments.

Return to “Metro, Metro Express, and Grand Central Boards”