Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-S3 does not boot until Serial console is attached. (Using CDC on Boot). #8238

Closed
1 task done
sblantipodi opened this issue May 22, 2023 · 2 comments
Closed
1 task done
Labels
Status: Awaiting triage Issue is waiting for triage

Comments

@sblantipodi
Copy link
Contributor

Board

Lolin ESP32-S3 Mini, TinyS3 by UM

Device Description

plain board

Hardware Configuration

no gpio in use

Version

latest master (checkout manually)

IDE Name

CLION

Operating System

Windows 11

Flash frequency

80MHz

PSRAM enabled

yes

Upload speed

115200

Description

Hi all...
I'm using an Esp32-S3 (from Lolin and from Unexpected Maker)

to use the Serial.print() on the ESP32-S3 I need to add this build_flags:
‘-D ARDUINO_USB_MODE=1’
‘-D ARDUINO_USB_CDC_ON_BOOT=1’
to my platformio.ini.

If I add this flags I can correctly print to Serial but the microcontroller doesn’t “boot” automatically.
If I connect the microcontroller to a power bank, the sketch does not start,
if I connect it to the usb the sketch does not start until I open the Serial monitor.

how this is possible?

Sketch

https://github.com/sblantipodi/glow_worm_luciferin/tree/reduced_footprint

Debug Message

Checking size .pio\build\glowwormluciferinfull_esp32s3\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  21.1% (used 69096 bytes from 327680 bytes)
Flash: [=======   ]  74.6% (used 977773 bytes from 1310720 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-builtin, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-us
b-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Using manually specified: COM11
Uploading .pio\build\glowwormluciferinfull_esp32s3\firmware.bin
esptool.py v4.5.1
Serial port COM11
Connecting...
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: f4:12:fa:a8:d5:b8
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
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 0x000fefff...
Compressed 15040 bytes to 10331...
Writing at 0x00000000... (100 %)
Wrote 15040 bytes (10331 compressed) at 0x00000000 in 0.3 seconds (effective 415.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (effective 453.2 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 528.9 kbit/s)...
Hash of data verified.
Compressed 978144 bytes to 630427...
Writing at 0x00010000... (2 %)
Writing at 0x0001d08a... (5 %)
Writing at 0x00028a6e... (7 %)
Writing at 0x00031f2d... (10 %)
Writing at 0x0003f1a3... (12 %)
Writing at 0x00044e71... (15 %)
Writing at 0x0004ad51... (17 %)
Writing at 0x0005125f... (20 %)
Writing at 0x00057783... (23 %)
Writing at 0x0005d5fb... (25 %)
Writing at 0x00062b3a... (28 %)
Writing at 0x000684ad... (30 %)
Writing at 0x0006d3a4... (33 %)
Writing at 0x00072439... (35 %)
Writing at 0x000772b8... (38 %)
Writing at 0x0007c0d6... (41 %)
Writing at 0x000812c5... (43 %)
Writing at 0x000868df... (46 %)
Writing at 0x0008c096... (48 %)
Writing at 0x000913b1... (51 %)
Writing at 0x000966e3... (53 %)
Writing at 0x0009b586... (56 %)
Writing at 0x000a0672... (58 %)
Writing at 0x000a575d... (61 %)
Writing at 0x000aac1f... (64 %)
Writing at 0x000affdf... (66 %)
Writing at 0x000b5894... (69 %)
Writing at 0x000ba9dd... (71 %)
Writing at 0x000bfc37... (74 %)
Writing at 0x000c57dd... (76 %)
Writing at 0x000cb142... (79 %)
Writing at 0x000d07a3... (82 %)
Writing at 0x000d5a9d... (84 %)
Writing at 0x000dadd2... (87 %)
Writing at 0x000e32f8... (89 %)
Writing at 0x000eb8ec... (92 %)
Writing at 0x000f0eee... (94 %)
Writing at 0x000f653e... (97 %)
Writing at 0x000fc0bb... (100 %)
Wrote 978144 bytes (630427 compressed) at 0x00010000 in 9.4 seconds (effective 835.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
remove_guard_file(["upload"], [".pio\build\glowwormluciferinfull_esp32s3\firmware.bin"])
============================================= [SUCCESS] Took 18.62 seconds =============================================


Environment                    Status    Duration
-----------------------------  --------  ------------
glowwormluciferinfull_esp32s3  SUCCESS   00:00:18.622
============================================= 1 succeeded in 00:00:18.622 =============================================

Process finished with exit code 0

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@sblantipodi sblantipodi added the Status: Awaiting triage Issue is waiting for triage label May 22, 2023
@sblantipodi
Copy link
Contributor Author

similar problem when disconnecting the serial console.
when disconnecting the serial console the ESP stops working.

@sblantipodi
Copy link
Contributor Author

Closing because I have found a duplicate issue here.
#7554

My problem was related to the fact that Serial.flush() is now blocking on ESP32-S3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting triage Issue is waiting for triage
Projects
None yet
Development

No branches or pull requests

1 participant