Page 1 of 1

Notice of upcoming change: ESP-IDF will assume 40MHz XTAL frequency by default

Posted: Thu Aug 24, 2017 3:44 am
by ESP_igrr
Currently during ESP-IDF startup we estimate the XTAL frequency, by measuring the number of XTAL clock cycles within certain number of internal 8MHz oscillator clock cycles. This method has proven to be not fully reliable, due to variation of oscillator frequency between individual chips, and temperature changes during operation. Since such failures do not happen in lab conditions during development, and only happen when large number of devices are deployed, it can be very hard to debug and diagnose such a problem.

To minimize the chance that customers roll out firmware with XTAL frequency autodetection enabled, and face issues afterwards, we are changing the default setting of ESP32_XTAL_FREQ_SEL option from ESP32_XTAL_FREQ_AUTO to ESP32_XTAL_FREQ_40. Note that AUTO option is still available, just not enabled by default.

After this change, users of boards with 26MHz XTALs (such as Sparkfun Thing) will see garbage on UART. To revert to normal operation, run 'make menuconfig' and set XTAL frequency to the desired value (AUTO or 26).

Re: Notice of upcoming change: ESP-IDF will assume 40MHz XTAL frequency by default

Posted: Sat Oct 14, 2017 8:30 pm
by kolban
A little bit more detail on this post. The SDKCONFIG entry is called "CONFIG_ESP32_XTAL_FREQ_SEL".

It can be set in "make menuconfig" under "Component Config" -> ESP32-Specific -> Main XTAL frequency.

Choices are:
40 MHZ
26 MHz
Autodetect