cpu/esp32: activate automatic XTAL detection #13059
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
This PR changes the configuration of the ESP crystal frequency from a fix value of 40 MHz to crystal auto detection.
ESP32 can be clocked with either a 40 MHz or 26 MHz crystal. Since most boards use a 40 MHz crystal and the ESP32 design rules recommend a crystal frequency of 40 MHz, the configuration was previously set to 40 MHz. This commit changes the crystal configuration from 40 MHz to automatic detection, which allows also to use boards with a 26 MHz crystal like the Sparkfun ESP32 Thing DEV.
Testing procedure
If there is a board with a 26 MHz crystal at hand (I only know the Sparcfun ESP32 Thing DEV), flash and test any shell based application:
Without this PR, this should result into garbage at the console with the default UART console speed of 115200 baud but should work with an UART console speed of 74800 baud.
With this PR, the console should work with the default UART console speed of 115200.
If no board with 26 MHz is available, it should be sufficient to test that the board works as before.
Issues/PRs references