ESP-S3 firmware does not run correctly

Issue #531 open
Ali Nouri created an issue

Hi,

I tried flashing ESP32-S3 firmware using the pilot version, hopefully, the chip is detected and flashed correctly but after resetting and running, I keep receiving this log in the log window of MicroBlocks:

Could not open serial port
Could not open serial port
Could not open serial port
Could not open serial port
Serial error, opcode: 154
     Ü␦σ8d0

Serial error, opcode: 83
     ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS
Serial error, opcode: 82
     _RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cdada
SPIWP
Serial error, opcode: 48
     :0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x
Serial error, opcode: 48
     403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
Serial error, start byte: 13

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS
Serial error, opcode: 82
     _RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cdada
SPIWP
Serial error, opcode: 48
     :0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x
Serial error, opcode: 48
     403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0

Serial error, opcode: 83
     ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS
Serial error, opcode: 82
     _RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cdada
SPIWP
Serial error, opcode: 48
     :0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x
Serial error, opcode: 48
     403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0

Serial error, opcode: 83
     ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS
Serial error, opcode: 82
     _RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cdada
SPIWP
Serial error, opcode: 48
     :0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x
Serial error, opcode: 48
     403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0

Serial error, opcode: 83
     ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS
Serial error, opcode: 82
     _RST),boot:0xa (SPI_FAST_FLASH_BOOT)

Am I doing something wrong? or Just a bug?

Comments (9)

  1. Ali Nouri reporter

    The serial terminal of the ESP32-S3 suggests that it keeps resetting by software!

    ESP-ROM:esp32s3-20210327
    Build:Mar 27 2021
    rst:0x1 (POWERON),boot:0xa (SPI_FAST_FLASH_BOOT)
    SPIWP:0xee
    mode:DIO, clock div:1
    load:0x3fce3808,len:0x44c
    load:0x403c9700,len:0xbd8
    load:0x403cc700,len:0x2a80
    entry 0x403c98d0
    ESP-ROM:esp32s3-20210327
    Build:Mar 27 2021
    rst:0x3 (RTC_SW_SYS_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
    Saved PC:0x403cdada
    SPIWP:0xee
    mode:DIO, clock div:1
    load:0x3fce3808,len:0x44c
    load:0x403c9700,len:0xbd8
    load:0x403cc700,len:0x2a80
    entry 0x403c98d0
    ESP-ROM:esp32s3-20210327
    Build:Mar 27 2021
    rst:0x3 (RTC_SW_SYS_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
    Saved PC:0x403cdada
    SPIWP:0xee
    mode:DIO, clock div:1
    load:0x3fce3808,len:0x44c
    load:0x403c9700,len:0xbd8
    load:0x403cc700,len:0x2a80
    entry 0x403c98d0
    ESP-ROM:esp32s3-20210327
    Build:Mar 27 2021
    rst:0x3 (RTC_SW_SYS_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
    Saved PC:0x403cdada
    SPIWP:0xee
    mode:DIO, clock div:1
    load:0x3fce3808,len:0x44c
    load:0x403c9700,len:0xbd8
    load:0x403cc700,len:0x2a80
    entry 0x403c98d0
    

    The ESP32-S3 module works fine with MicroPython firmware and also Arduino. som I am pretty sure that it’s not a hardware bug.

  2. John Maloney repo owner

    The ESP32 seems to be hitting some sort of error in its boot sequence. It could be that installing the MicroBlocks firmware failed in some way or possibly due to a difference in the Flash memory configuration between your board and the one I've tested.

    I've only tested the ESP32-S3-DevKitC-1 board from Espressif. What board are you using?

    How did you install the MicroBlocks firmware? If you used the "install ESP firmware from URL" what URL did you use?

  3. John Maloney repo owner

    I've verified that the current pilot ESP32-S3 firmware:

    https://microblocks.fun/downloads/pilot/vm/vm_esp32-s3.bin

    can be installed on my DevKitC-1 board using the "install ESP firmware from URL" command in the Pilot version of MicroBlocks running the Chrome browser.

    I used the "UART" USB connector on the board (not the one marked USB).

    Here's what is printed in the Javascript console during the installation process:

    Connected Chip type: ESP32-S3 Stub started uploaded bootloader at 0 15104 bytes uploaded boot_app0.bin at 57344 8192 bytes uploaded partitions.bin at 32768 3072 bytes uploaded vmData at 65536 1097280 bytes

    After the installation, I did not need to power cycle the board.

    NOTE: Make sure that the stand-alone MicroBlocks app is not running when you install the firmware.

  4. John Maloney repo owner

    It could be that the Flash memory needs to be erased. You could try doing "erase flash and update firmware on ESP board", selecting "ESP32" as the board type. The ESP32 firmware won't work, of course, but doing this will clear Flash memory. After that, you can run "install ESP firmware from URL" with the ESP32-S3 link.

    Does that help?

  5. Ali Nouri reporter

    Well, I tried "erase flash and update firmware on ESP board" and the problem persists, here is the log of the successful flashing process

    Connected
    Chip type: ESP32-S3
    Stub started
    uploaded bootloader at 0 15104 bytes
    uploaded boot_app0.bin at 57344 8192 bytes
    uploaded partitions.bin at 32768 3072 bytes
    uploaded vmData at 65536 1222336 bytes
    

    then I tried using URL : https://microblocks.fun/downloads/pilot/vm/vm_esp32-s3.bin

    Connected
    Chip type: ESP32-S3
    Stub started
    uploaded bootloader at 0 15104 bytes
    uploaded boot_app0.bin at 57344 8192 bytes
    uploaded partitions.bin at 32768 3072 bytes
    uploaded vmData at 65536 1097280 bytes
    

    But this time it works fine. it seems like the auto-detection process does not select the right image file!

  6. John Maloney repo owner

    Glad you got it working!

    it seems like the auto-detection process does not select the right image file!

    That is the expected behavior because MicroBlocks does not fully support the ESP32-S3.

    You'll notice that ESP32-S3 does not appear in the firmware install menu. The ESP32-S3 is a different chip from the original ESP32 (different pins, different memory configuration, etc.) so the ESP32 firmware will not run on it. Is that what you tried the first time?

    The ESP32-S3 is what we call a "community supported" board, which means that some preliminary testing has been done by the community but the MicroBlocks team has not fully tested it, and you need to download the ESP32-S3 firmware manually using the "install ESP firmware from URL" command.

    The status of the ESP32-S3 may change to "supported" as that board increases in popularity. You can contribute by carefully testing the board and reporting any problems you find. Things that need testing are WiFi, Bluetooth BLE, and pin IO (including servo, PWM, and Tone output). It is also helpful to let us know if your testing is successful. Please report successful test results on this issue, even after it is closed. Thanks!

  7. Ali Nouri reporter

    Thanks a lot for your comments, we are actually designing a new board using ESP32-S3.
    I just get confused by log message that detects ESP32-S3, so I thought it would be ok to flash it using the “update firmware on board” menu.
    I think I can contribute to ESP32-S3 VM soon, as both reporter and developer.

  8. Log in to comment