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

Fix flash/monitoring of 26mhz targets #584

Merged
merged 10 commits into from
Feb 16, 2024

Conversation

SergioGasquez
Copy link
Member

@SergioGasquez SergioGasquez commented Feb 15, 2024

  • Remove InvalidSerialRead error
  • Fix Clippy lints
  • Update monitoring baudrate when using stub
  • Update ESP32-C2 stub to support 26MHz targets. Stubs have been generated using esp-flasher-stub, which uses esp-hal with the changes of this branch: esp-rs/esp-hal@main...SergioGasquez:esp-hal:feat/clk-src

Thanks @bjoernQ for the help resolving this issue

I've reverted the changes for ESP32, as I dont have a 26MHz to test it, I dont know if anyone from the team has one, and ESP32 cant choose xtal_clock as UART source. From ESP32 TRM:

The UART block can derive its clock from two
sources: the 80-MHz APB_CLK, or the reference clock REF_TICK (please refer to Chapter Reset and Clock for
more details). These two clock sources can be selected by configuring UART_TICK_REF_ALWAYS_ON.

UART_TICK_REF_ALWAYS_ON This register is used to select the clock; 1: APB clock; 0: REF_TICK

Tests

  • I've build and flash the rng example of esp-hal to a 26MHz C2 and a 40MHz C2 with no issues
    • Monitoring also worked fine
  • Board info shows the proper freq for both 26 and 40 MHz

@SergioGasquez SergioGasquez changed the title Fix/flash 26mhz Fix flash/monitoring of 26mhz targets Feb 15, 2024
@SergioGasquez SergioGasquez marked this pull request as draft February 15, 2024 15:57
@SergioGasquez SergioGasquez linked an issue Feb 15, 2024 that may be closed by this pull request
Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - works fine for me with both 26 and 40 MHz ESP32-C2

@SergioGasquez SergioGasquez merged commit fff36e4 into esp-rs:main Feb 16, 2024
20 checks passed
@SergioGasquez SergioGasquez deleted the fix/flash-26mhz branch February 16, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect monitoring in 26MHz targets
2 participants