Xinyuan-LilyGO / LilyGo-EPD47

GNU General Public License v3.0
379 stars 119 forks source link

S3 is not accessible after going into deep sleep #97

Open BatsIhor opened 1 year ago

BatsIhor commented 1 year ago

Hi there, I have uploaded my sketch with deep sleep after showing a text and now I can't upload anything else as right after it displays image it goes into deep sleep and disappear from list of devices.

I tried to press reset "on time" so I'm able to update code but hope there are other options to make sure I can upload without trying 10 times.

Can I put it into flash mode somehow?

Thanks

homonto commented 1 year ago

if you use "lilygo-t5-47-plus" with S3 in Arduino, you need to set up "CDC Enabled" in Arduino. If you use platformio you need to use:

build_flags =
    -D BOARD_HAS_PSRAM
    -D CONFIG_IDF_TARGET_ESP32S3=1
    -D CORE_DEBUG_LEVEL=0
    -D ARDUINO_USB_MODE=1
    -D ARDUINO_USB_CDC_ON_BOOT=1 

I had the same problem and I sorted it out.

But more important: if you send it to sleep immediately after it did the job, your serial monitor might NOT have enough time to realise that the S3 is connected - try to add i.e. delay(10000); before it goes to sleep and check then - later you can remove of course see below - when it goes to sleep you don't see it at all as power is off


[setup] poweroff done: 3796ms
Disconnected (read failed: [Errno 6] Device not configured)
Reconnecting to /dev/cu.usbmodem2101 .....       Connected!
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021