Skip to content

Commit

Permalink
Add FAQ entry for the 26MHz error
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Nov 28, 2023
1 parent a2f046c commit 85cecba
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@
- [Wokwi](./tooling/simulating/wokwi.md)
- [QEMU](tooling/simulating/qemu.md)
- [Troubleshooting](./troubleshooting/index.md)
- [`esp-idf-hal` based projects](./troubleshooting/std.md)
- [`esp-idf-hal` based projects](./troubleshooting/std.md)
- [`espflash`](./troubleshooting/espflash.md)
30 changes: 30 additions & 0 deletions src/troubleshooting/espflash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# espflash

## Error when trying to use espflash: `rtc_clk_init: Possibly invalid CONFIG_XTAL_FREQ setting`

This issue is reported by users using an ESP32 module with a 26MHz crystal oscillator. The root
cause of the issue is that the default bootloader flashed by espflash expects a 40MHz crystal.

### If you are building an `esp-idf-hal` based project

Make sure your `sdkconfig` is set up properly to use a 26MHz crystal. It needs to contain the
following configuration options:

```
CONFIG_ESP32_XTAL_FREQ_26=y
CONFIG_ESP32_XTAL_FREQ=26
```

You should also prefer using `cargo-espflash` over `espflash`. `cargo-espflash` integrates with your
project and it will flash the bootloader that is built next to your project instead of the default
one.

TODO is this enough? How to get `espflash` working?

### If you are building an `esp-hal` based project

Make sure your HAL ([ESP32](https://docs.rs/esp32-hal/latest/esp32_hal/), [ESP32-C2](https://docs.rs/esp32c2-hal/latest/esp32c2_hal/))
is configured to the correct crystal frequency. To do this, you must disable the default features
and enable `xtal-26mhz` (besides the other default features).

INCOMPLETE

0 comments on commit 85cecba

Please sign in to comment.