Xinyuan-LilyGO / T-Dongle-S3

An ESP32S3 development board that can freely use WIFI, BLE, TF, LED, TFT_LCD functions.
MIT License
128 stars 40 forks source link

Fail to upload factory and default firmware #10

Open JpEncausse opened 1 year ago

JpEncausse commented 1 year ago

Hello,

error

I don't know what to do,

  1. I need to upload the firmware with esptool to validate it works
  2. then uderstand why I can't upload from PlatformIO

I switch port, reduce the bandwith, etc ... nothing change Now when I monitor the device from VSCode I have a loop :

Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403bb22e
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x43c
load:0x403b6000,len:0xbd0
load:0x403ba000,len:0x29c8
SHA-256 comparison failed:
Calculated: 27beaa143e4753b6cdeed5b388d3ebbf4c921ce01156fd10673139a323a25557
Expected: 6eb14ec480aff4f05e39378c41406102ac163573741e63b6cfd73509ef44e3bd
Attempting to boot anyway...
entry 0x403b61d8
ESP-ROM:esp32s3-20210327
JpEncausse commented 1 year ago

It's like the device get disconnected while uploading or something like that. I tried multiple USB port same issue. A fatal error occurred: The chip stopped responding.

JpEncausse commented 1 year ago

So pressing the button while inserting the USB, seems to always help uploading the firmware with esptool.exe

But otherwise the upload of the firmware or the from platformio fail most of the time. I assume the USB key do something ?? that break upload ?

JpEncausse commented 1 year ago

I confirm, the Serial communication from this device is not stable.

SerialPrint

When I correctly upload my custom firmware (doing Serial.print() ) I see text chuck in VSCode with spaces ' ' in the middle of trace, like if the lag introduce kind of error or chunck.

lewisxhe commented 1 year ago

1.Pressed BOOT Button

  1. Insert USB
  2. Upload
JpEncausse commented 1 year ago

1.Pressed BOOT Button 2. Insert USB 3. Upload

Yes that's the workflow I use to save the dongle with master firmware when nothing works

But how do you handle regular developpement in PlatformIO ? Do you follow these steps each time before pressing Upload of your code ?!

I don't have these issue with other LILYGO devices (camera, display, etc ... works fine) Is it a specific issue to this type of device ? or my device has flaws?

lewisxhe commented 1 year ago

No, the program does not need to operate in this way during normal operation. It is only necessary to operate in this way when the wrong program is running causing chip abnormalities.

JpEncausse commented 1 year ago

There is still a lot of difficulities to upload custom code with PlatformIO to the device in normal mode. It fail > 50% of the time and need to reset to default firmware (plug / push button) before trying again Is it normal behavior ?

lewisxhe commented 1 year ago

Try reducing the Baud by 115200. I have no problem with the test here.