PlatformIO Community

Upload stops at 60% and ESP32 reboot

Hi all,
I received a T-Display-S3 board that use ESP32-S3R8.
I tried their example “factory” and been able to upload it on my board.

I tried to decalre a new serial port using
#include <HardwareSerial.h>

HardwareSerial SerialPort(1); // use UART1

void setup()
{

SerialPort.begin(115200, SERIAL_8N1, 50, 49);

}

I tried to upload it, the upload worked, the program did not run, I tried to reupload it and now it stops around 60% with the message:

Retrieving maximum program size .pio\build\ESP32-S3-DevKitC-1\firmware.elf
Checking size .pio\build\ESP32-S3-DevKitC-1\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]  12.7% (used 41484 bytes from 327680 bytes)
Flash: [====      ]  41.5% (used 1385969 bytes from 3342336 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-builtin, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM3
Uploading .pio\build\ESP32-S3-DevKitC-1\firmware.bin
esptool.py v3.3
Serial port COM3
Connecting....
Chip is ESP32-S3
Features: WiFi, BLE
Crystal is 40MHz
MAC: f4:12:fa:cf:c5:7c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00003fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00162fff...
Flash params set to 0x023f
Compressed 13936 bytes to 9695...
Writing at 0x00000000... (100 %)
Wrote 13936 bytes (9695 compressed) at 0x00000000 in 0.3 seconds (effective 327.8 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 129...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (129 compressed) at 0x00008000 in 0.1 seconds (effective 357.1 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 462.8 kbit/s)...
Hash of data verified.
Compressed 1386400 bytes to 1058783...
Writing at 0x00010000... (1 %)
Writing at 0x0001a84f... (3 %)
Writing at 0x0001f5d5... (4 %)
Writing at 0x000235e2... (6 %)
Writing at 0x000275ec... (7 %)
Writing at 0x0002b5f7... (9 %)
Writing at 0x0002f60d... (10 %)
Writing at 0x0003362f... (12 %)
Writing at 0x0003764a... (13 %)
Writing at 0x0003b674... (15 %)
Writing at 0x0003f691... (16 %)
Writing at 0x00043698... (18 %)
Writing at 0x000476a5... (20 %)
Writing at 0x0004b6bb... (21 %)
Writing at 0x0004f6c7... (23 %)
Writing at 0x000536e8... (24 %)
Writing at 0x00057708... (26 %)
Writing at 0x0005b70d... (27 %)
Writing at 0x0005f723... (29 %)
Writing at 0x00063732... (30 %)
Writing at 0x0006773e... (32 %)
Writing at 0x0006b76d... (33 %)
Writing at 0x0006f76e... (35 %)
Writing at 0x00073779... (36 %)
Writing at 0x0007778a... (38 %)
Writing at 0x0007b7a3... (40 %)
Writing at 0x0007f7be... (41 %)
Writing at 0x000839a8... (43 %)
Writing at 0x0008cd67... (44 %)
Writing at 0x000984da... (46 %)
Writing at 0x000a24ae... (47 %)
Writing at 0x000a79cf... (49 %)
Writing at 0x000aca8c... (50 %)
Writing at 0x000b1c0d... (52 %)
Writing at 0x000b6d35... (53 %)
Writing at 0x000bc4d8... (55 %)
Writing at 0x000c1590... (56 %)
Writing at 0x000c66bc... (58 %)
Writing at 0x000cbeb8... (60 %)
Writing at 0x000d1e2c... (61 %)
Traceback (most recent call last):
  File "C:\Users\Alex\.platformio\packages\tool-esptoolpy\esptool.py", line 458, in command
    self.write(pkt)
  File "C:\Users\Alex\.platformio\packages\tool-esptoolpy\esptool.py", line 421, in write
    self._port.write(buf)
  File "C:\Users\Alex\.platformio\penv\lib\site-packages\serial\serialwin32.py", line 325, in write
    raise SerialTimeoutException('Write timeout')
serial.serialutil.SerialTimeoutException: Write timeout

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Alex\.platformio\packages\tool-esptoolpy\esptool.py", line 5387, in <module>
    _main()
  File "C:\Users\Alex\.platformio\packages\tool-esptoolpy\esptool.py", line 5380, in _main
    main()
  File "C:\Users\Alex\.platformio\packages\tool-esptoolpy\esptool.py", line 4812, in main
    operation_func(esp, args)
  File "C:\Users\Alex\.platformio\packages\tool-esptoolpy\esptool.py", line 4007, in write_flash
    esp.flash_defl_block(block, seq, timeout=timeout)
  File "C:\Users\Alex\.platformio\packages\tool-esptoolpy\esptool.py", line 143, in inner
    return func(*args, **kwargs)
  File "C:\Users\Alex\.platformio\packages\tool-esptoolpy\esptool.py", line 931, in flash_defl_block
    self.check_command("write compressed data to flash after seq %d" % seq,
  File "C:\Users\Alex\.platformio\packages\tool-esptoolpy\esptool.py", line 495, in check_command
    val, data = self.command(op, data, chk, timeout=timeout)
  File "C:\Users\Alex\.platformio\packages\tool-esptoolpy\esptool.py", line 484, in command
    self._port.timeout = saved_timeout
  File "C:\Users\Alex\.platformio\penv\lib\site-packages\serial\serialutil.py", line 372, in timeout
    self._reconfigure_port()
  File "C:\Users\Alex\.platformio\penv\lib\site-packages\serial\serialwin32.py", line 222, in _reconfigure_port
    raise SerialException(
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: OSError(22, 'Un périphérique qui n’existe pas a été spécifié.', None, 433)
*** [upload] Error 1
================================================================================================== [FAILED] Took 39.59 seconds ==================================================================================================

I tried, different USB cable, ports… did not do anything.

Do you have any idea?

Thank you

image

Tried slower baud? upload_speed = 115200 in the platformio.ini.

Thanks I tried 115200, then 9600, still got the error.
I moved to Arduino IDE, upload a dummy prog, it went fine.
Went back to platform IO and now it is working…
Weird