M5stack Atom S3 Lite (which compile settings?) - Totally freaking out after 3 night/days

Hello,

I am trying to get WLED 0.14 working on a M5Stack Atom S3 Lite. (link: https://shop.m5stack.com/products/atoms3-lite-esp32s3-dev-kit )

After compiling and flashing the device with esptool, the device stays in a boot loop… (hearing that bwop…unplug…whop…plug-in…whop…unplug sound all the time on my Windows PC).

I have read all topics about it, even about the (older, non S3 version) and tried 20+ rebuilds… Some people said the older (M5stack Atom Lite) was doing a boot-loop because the led pin was mapped to the reset pin… (see: Both .13 betas cause loop reboot on M5stack atom lite · Issue #2108 · Aircoookie/WLED · GitHub ). But setting the LED pin correctly did not work.

Facts:
According to the pictures, it shows that BTN PIN: G41 and RGB LED: G35.
The device has 8MB Flash and -not- 8MB ram.

What I’ve tried:

  • Compile with: -D LEDPIN=35 -D BTNPIN=39
  • Compiled with default_envs=sp32s3dev_8MB as well as esp32s3dev_8MB_PSRAM_opi as well as m5atom. I am quite sure it are not those last two because it has no 8MB PSRAM and the m5atom is just esp32dev, not esp32s3.
  • Compiled with: board_build.flash_mode = qio and board_build.flash_mode = dio
  • Compiled with: D ARDUINO_USB_CDC_ON_BOOT=0 and -D ARDUINO_USB_CDC_ON_BOOT=1 as well as -D ARDUINO_USB_MODE=1

Now trying to terminal monitor this device, but I am a little new on that (from platform IO).

Help me fixing this and I send you a free M5Stack Atom S3 :slight_smile:

Update: I get exactly the same when I only flash the bootloader to the device and unplug it… then when plugging it… it will also boot loop. Is that normal behavior?

I also tried the custom bootloader, partition table and firmware from this post: Support for the ESP32-S3 · Issue #2735 · Aircoookie/WLED · GitHub

Update: I can flash the device using TASMOTA web installer: Install Tasmota
Select Type: ALL and for firmware: Tasmota, Tasmota-4MB or Tasmota-CDC (all did work).
This is the Logfile when booted with Tasmota:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4210de3e
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x128
load:0x403c9700,len:0xb90
load:0x403cc700,len:0x28cc
SHA-256 comparison failed:
Calculated: 6ff891185212526dc4a8a02f94359cdb7c96c9ee016fd617c4433ef60c921ae8
Expected: 2fccfe0baabcabc13349ed33dd0cb9dda386de5630d8160a25c7b2d9a6dc3df3
Attempting to boot anyway...
entry 0x403c98b8

After this, I tried the WLED Web installer again… but it did not came up with Wifi and when doing a Serial monitor, I saw this:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x400454d5
SPIWP:0xee
mode:QIO, clock div:1
load:0x3c0f0020,len:0x47624
ets_loader.c 78 
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x400454d5
SPIWP:0xee
mode:QIO, clock div:1
load:0x3c0f0020,len:0x47624
ets_loader.c 78 
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x400454d5
SPIWP:0xee
mode:QIO, clock div:1
load:0x3c0f0020,len:0x47624
ets_loader.c 78 
ESP-ROM:esp32s3-20210327

I now compiled a firmware based on esp32s3dev_8MB with the following changes:

 -D ARDUINO_USB_CDC_ON_BOOT=0  ;; -D ARDUINO_USB_MODE=1 ;; for boards with serial-to-USB chip
;-D ARDUINO_USB_CDC_ON_BOOT=1 ;; -D ARDUINO_USB_MODE=1 ;; for boards with USB-OTG connector only (USBCDC or "TinyUSB")
  -D LEDPIN=35
;board_build.flash_mode = qio
board_build.flash_mode = dio   ;; try this if you have problems at startup

And it looks that it will boot just a little further…:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cd9ea
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x128
load:0x403c9700,len:0xb90
load:0x403cc700,len:0x28cc
SHA-256 comparison failed:
Calculated: 6ff891185212526dc4a8a02f94359cdb7c96c9ee016fd617c4433ef60c921ae8
Expected: 2fccfe0baabcabc13349ed33dd0cb9dda386de5630d8160a25c7b2d9a6dc3df3
Attempting to boot anyway...
entry 0x403c98b8
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cd9ea
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x128
load:0x403c9700,len:0xb90
load:0x403cc700,len:0x28cc
SHA-256 comparison failed:
Calculated: 6ff891185212526dc4a8a02f94359cdb7c96c9ee016fd617c4433ef60c921ae8
Expected: 2fccfe0baabcabc13349ed33dd0cb9dda386de5630d8160a25c7b2d9a6dc3df3
Attempting to boot anyway...
entry 0x403c98b8
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cd9ea
SPIWP:0xee
mode:DIO, clock div:1

Hey @Roeller, I’m trying to do the same thing as you with a Atom S3 Lite, but currently I have the same issue as you on windows, “bwop…unplug…whop…plug-in…whop…unplug”.

Tried to connect on a linux machine and do esptool erase_flash and also tried to flash all the firmware/booloader from Support for the ESP32-S3 · Issue #2735 · Aircoookie/WLED · GitHub but so far no success, I always get some I/O errors.

How did you managed to re-flash a firmware while in boot loop?

For reference what drove me to the boot loop:

  1. Install WLED 0.14.0 using WLED web installer
    => Flash succeed, but the “WLED_AP” never appears
  2. Try to flash WLED_0.14.0_ESP32-S3_8MB.bin from release of october 13th using the Windows WLED ESP Flasher https://github.com/srg74/WLED-wemos-shield/tree/master/resources/Firmware/WLED_%20ESP_Flasher
    => Flash succeed … and start to cycle boot

Well, I hope that can give you a good Christmas light controller then because I found the issue :slight_smile:

  1. Use a 4mb partition table
  2. Use a start start offset of 0 (0x0), not 0x1000 !

To do it easy, flash with WLED S3 4MB image! Go to wled-install.github.io and select ESP-S3 4MB flash. (First connect it to your computer while holding the side button, then release the side button, then flash)

To do it with esptool, use, all in once, using:
bootloader_esp32s3.bin with offset 0x1000
partitions_v2022.bin with offset 0x8000
boot_app0_v2022.bin with offset 0xe000 (don’t forget this, it is not always mentioned!)
The wled image with offset 0x10000

Have a nice light show! :slight_smile:

1 Like

Ho great, it worked with http://wled-install.github.io/ (used the standard version 0.14.0 S3 4MB) :tada:. To re-flash I had to hold the reset button for few seconds: while connecting, but also hold few seconds after, windows stopped its “melody” and I was able to flash.

Thanks a lot @Roeller :slight_smile:

A small update: I saw a lot of crashes (flash/crash dumps) happening with QIO flash mode. So I switched WLED platformio.ini to DIO mode and also flashed with esptool using DIO mode. Then I didn’t saw any crash dumps anymore…