ESP32 External 32 KHz External Crystal How to Enable it

rsavage
Posts: 6
Joined: Sun Jul 14, 2019 11:34 pm

ESP32 External 32 KHz External Crystal How to Enable it

Postby rsavage » Mon Aug 12, 2019 8:11 pm

I have a "Sparkfun ESP32 Thing" and a "Adafruit ESP32 Huzza" both have a external 32 KHz crystal available and I am using Arduino IDE for programming. To see if the external crystal is enabled I checked the "sdkconfig" file and it shows the following.

CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL=
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC=
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256=

Based on the above I conclude that the internal crystal is being used.

Using the Arduino IDE is there a way to set the External Crystal using "#define" or "set" commands in the Arduino code? Or can I just change the entry in the "sdkconfig" file to the following? And make sure that the other sources listed are not checked.

CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL=y

Any help is greatly appreciated,

Thanks

Who is online

Users browsing this forum: Bing [Bot] and 61 guests