Does anyone have specifications regarding the crystal and the capacitance to use for the external 32.768kHz clock with the ESP32Wroom module?
I have tried using this crystal: https://www.digikey.com/product-detail/ ... ND/3927445 .
with 12pF capacitors on both sides.
We are seeing failure in about 20-25% of our units. The ESP32 during startup displays the following message:
"clk: RTC: Not found External 32kHz crystal. Switching to internal 150 kHz RC chain."
I have also tried to switch to 6pF capacitors on both sides with the above crystal and it still does not work.
Any insights into this issue will be really appreciated.
External 32768 clock
Re: External 32768 clock
Hi,WiFive wrote: ↑Fri Mar 29, 2019 11:48 amhttps://github.com/espressif/esp-idf/issues/2101
https://github.com/espressif/esp-idf/co ... f66fae576a
I am using esp-idf v1.1.1 which already has the bug fix that was reported. I am still getting the failures in a few boards.
Re: External 32768 clock
The issue was resolved by changing the clk.c file with the bugfix (https://github.com/espressif/esp-idf/co ... f66fae576a)WiFive wrote: ↑Fri Mar 29, 2019 11:48 amhttps://github.com/espressif/esp-idf/issues/2101
https://github.com/espressif/esp-idf/co ... f66fae576a
Any idea why this bug fix is not part of the standard release yet?
Last edited by tsc1987 on Tue Apr 02, 2019 5:27 pm, edited 1 time in total.
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: External 32768 clock
What do you mean by 'standard release'? As far as I can see, that fix has been in ESP-IDF since 3.1 was released. Are you really sure you're using ESP-IDF 1.x.x? Because the 1.x branch is three years old and unmaintained by now.
Re: External 32768 clock
Sorry the firmware version is v3.1.1.
Also, the issue wasn't fixed with the changes. I ran unit tests on the clock. For the cases where its not working properly, the unit tests show that the crystal is detected but the time measurement fails.Following are the results of the unit tests:
attempt #1/3... [time=63] FAIL. Time measurement...FAIL [calibration val = 16000371]
attempt #2/3... [time=63] FAIL. Time measurement...FAIL [calibration val = 15999923]
attempt #3/3... [time=63] FAIL. Time measurement...FAIL [calibration val = 16000115]
Also, the issue wasn't fixed with the changes. I ran unit tests on the clock. For the cases where its not working properly, the unit tests show that the crystal is detected but the time measurement fails.Following are the results of the unit tests:
attempt #1/3... [time=63] FAIL. Time measurement...FAIL [calibration val = 16000371]
attempt #2/3... [time=63] FAIL. Time measurement...FAIL [calibration val = 15999923]
attempt #3/3... [time=63] FAIL. Time measurement...FAIL [calibration val = 16000115]
-
- Posts: 27
- Joined: Tue Feb 05, 2019 5:26 pm
Re: External 32768 clock
Are you giving enough time for the crystal to stabilize after power up, before measurement?
What is your layout like, trace length?
I don't like that the datasheet says "Load capacitance at both ends should be configured according to the crystal’s specification."
Usually there's a recommended load capacitance from the uC manufacturer.
What is your layout like, trace length?
I don't like that the datasheet says "Load capacitance at both ends should be configured according to the crystal’s specification."
Usually there's a recommended load capacitance from the uC manufacturer.
-
- Posts: 27
- Joined: Tue Feb 05, 2019 5:26 pm
Re: External 32768 clock
I have found this info. ESP32 does not seem to have an internal bias / feedback resistor internal to the chip. So it would be needed externally "for the oscillator to reliably start up- it biases the amplifier into the linear region where noise can be amplified to get the crystal oscillator going." ( From https://electronics.stackexchange.com/q ... ss-crystal).
The ESP32 datasheet says "The parallel resistor R4 is used for biasing the crystal circuit (5 MΩ < R4 ⩽ 10 MΩ)." And the image shows the R4 resistor is external to the ESP32 in the ESP32 Hardware Design Guidelines V2.7 page 6 Figure 6.
What is odd is that the WROVER kit doesn't have this resistor. But it is a dev kit, so not really a design to base yours on.
You could try adding a resistor across the pins, and/or making sure your caps calculation take into consideration some stray capacitance, say 2pF. CX1=CX2 = 2(CL - Cstray). So for your Digi-Key crystal with 6pF load capacitance, try 8pF caps. And ensure the caps are higher voltage (say 50V) at least 5% or less, and C0G(NP0).
The ESP32 datasheet says "The parallel resistor R4 is used for biasing the crystal circuit (5 MΩ < R4 ⩽ 10 MΩ)." And the image shows the R4 resistor is external to the ESP32 in the ESP32 Hardware Design Guidelines V2.7 page 6 Figure 6.
What is odd is that the WROVER kit doesn't have this resistor. But it is a dev kit, so not really a design to base yours on.
You could try adding a resistor across the pins, and/or making sure your caps calculation take into consideration some stray capacitance, say 2pF. CX1=CX2 = 2(CL - Cstray). So for your Digi-Key crystal with 6pF load capacitance, try 8pF caps. And ensure the caps are higher voltage (say 50V) at least 5% or less, and C0G(NP0).
-
- Posts: 27
- Joined: Tue Feb 05, 2019 5:26 pm
Re: External 32768 clock
Any feedback?
Would like to know if you had any positive affects on your board.
Would like to know if you had any positive affects on your board.
Who is online
Users browsing this forum: vritzka and 88 guests