Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ESP32-C2 26 MHZ #44

Closed
SergioGasquez opened this issue Jan 17, 2024 · 2 comments
Closed

Support for ESP32-C2 26 MHZ #44

SergioGasquez opened this issue Jan 17, 2024 · 2 comments

Comments

@SergioGasquez
Copy link
Member

Currently, when trying to flash a ESP32-C2 26 MHZ:

[2024-01-17T11:16:26Z DEBUG] Finish stub write
[2024-01-17T11:16:26Z DEBUG] Writing command: MemEnd { no_entry: false, entry: 1077411840 }
[2024-01-17T11:16:26Z DEBUG] Stub written!
Error: espflash::timeout

  × Error while connecting to device
  ╰─▶ Timeout while running command

Part of espflash where it hangs: https://github.com/esp-rs/espflash/blob/main/espflash/src/flasher/mod.rs#L622-L632

Probably, the same would happen for ESP32 26MHz, which is not common, but there are some user with this config.

@SergioGasquez
Copy link
Member Author

SergioGasquez commented Jan 17, 2024

Maybe we should also update the baudrate in
https://github.com/esp-rs/esp-flasher-stub/blob/main/src/main.rs#L53 depending on the crystal frequency like we do in espflash: https://github.com/esp-rs/espflash/blob/074f8bcdbcbc5890909932ec99a157837202f025/espflash/src/bin/espflash.rs#L273-L278

Edit: Migth not be needed, according to the docs:

ESP32-C2 always initialises at 115200bps. However the sync packets can be sent at any baud rate, and the UART peripheral will detect this.

@SergioGasquez
Copy link
Member Author

Fixed in esp-rs/espflash#584

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant