Xinyuan-LilyGO / LilyGo-LoRa-Series

LILYGO LoRa Series examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

T3S3 v1.2: if "USB CDC on boot" enabled, cannot boot from USB power-only?

moshe-braner opened this issue · comments

I'm adapting a project from the old ESP32 "paxcounter" to the T3S3 (v1.2). This is my first work on the ESP32-S3 so maybe I'm just confused. But in what reading I have done, I could not find issue this mentioned:

I enabled "USB CDC on boot" (in the Arduino IDE) to be able to see output from Serial.print() (in the "Serial Monitor") - important for development. That works, but if I then run the same sketch (already uploaded) on the same board with just a USB power adapter (instead of plugging into a computer) it does not finish booting. It is as if the CDC requires handshaking with the other device (the computer)?

I have found a workaround: disabling "CDC on boot", and replacing all the Serial.* with USBSerial.* (which can be done via a #define). I then need to press the "boot" button for each upload, but that is far better than producing a sketch that cannot run without a computer connected. But maybe I am missing something.

It is possibly the same issue reported here:
espressif/arduino-esp32#9545
If so, then it is a bug in the older board support Core, that has been fixed in a later version. Unfortunately I cannot use later versions, because my compiled binary then does not fit in the flash space (and may also not have enough RAM). With each version the Core (and other libraries) gets bigger, that is a problem.