Understanding the external 32khz clock

zazas321
Posts: 231
Joined: Mon Feb 01, 2021 9:41 am

Understanding the external 32khz clock

Postby zazas321 » Tue Feb 22, 2022 6:11 am

Hello. For our project, we have added an external 32 khz clock on pins IO32 and IO33. By default, the ESP32 is using the internal clock is that correct? Do I need to tell ESP32 to use the external clock specifically and if yes, how can I do that?

Does using external clock vs internal clock have differences in accuracy when calling functions such as vTaskDelay ?

The reason why I want to understand the need for an external oscillator is because we really need 2 spare pins on the ESP32 and all the other pins are already occupied. If we removed the external 32khz oscillator then we would have 2 spare pins but we do not want make any new problems for us by removing this clock.

Could someone point me in the right direction and help me understand about the external clock for the ESP32 and whether it is really necessary.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Understanding the external 32khz clock

Postby WiFive » Tue Feb 22, 2022 6:21 am

32khz crystal is for better accuracy in sleep mode especially for Bluetooth power save. Otherwise it is optional.

zazas321
Posts: 231
Joined: Mon Feb 01, 2021 9:41 am

Re: Understanding the external 32khz clock

Postby zazas321 » Tue Feb 22, 2022 6:37 am

I am going to sleep mode but I do not use timer to wake up. I use external gpio wake up source. Does that mean that I do not need external 32khz oscilator at all?

ESP_Sprite
Posts: 9746
Joined: Thu Nov 26, 2015 4:08 am

Re: Understanding the external 32khz clock

Postby ESP_Sprite » Tue Feb 22, 2022 7:52 am

It depends. If you need to maintain the current (wallclock) time and date or need to figure out how long exacty you slept with any sort of precision, then yes. If not, then no.

Who is online

Users browsing this forum: No registered users and 82 guests