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

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

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

Postby ESP_igrr » Thu Aug 24, 2017 3:44 am

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).

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

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

Postby kolban » Sat Oct 14, 2017 8:30 pm

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
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 107 guests