esp-rs / espflash

Serial flasher utility for Espressif SoCs and modules based on esptool.py
Apache License 2.0
455 stars 110 forks source link

Incorrect monitoring in 26MHz targets #582

Closed SergioGasquez closed 4 months ago

SergioGasquez commented 4 months ago

After merging https://github.com/esp-rs/esp-hal/pull/1165, I've regenerated C2 stub, with dprint feature enabled, stub is attached. Using this stub, I can flash both a 26MHz C2 and a 40MHz C2, but there are still a few issues:

If I use a C stub, I cant flash a 26MHz C2 as espflash does not detect the OHAI message, which results in a timeout, this probably happens because we are using an incorrect baudrate and we cant decode the message.

Using --no-stub, everything works fine.

This is the branch where I am conducting the tests: https://github.com/SergioGasquez/espflash/tree/fix/flash-26mhz

stub_flasher_32c2.zip

Update: I've been debugging this morning with @bjoernQ and we found the part of issue, we were using APB clock as source for UART, we changed it, regenerated the stub, and now espflash detects the xtal frequency properly. Here is the updated stub:

stub_flasher_32c2.zip