Would someone at EspressIF please provide up-to-date information regarding how to connect an external 32.768kHz oscillator to the ESP32 (I'm using the ESP32-WROOM-32E) and the software configuration for using it (ESP-IDF) for the RTC?
I am using an external TCXO that produces a 3v3 square wave through a resistor divider to deliver a 750mV p-p square wave to the IO32 (XN) pin. IO33 (XP) has a 1nF to ground. (see:
https://docs.espressif.com/projects/esp ... _tree.html)
or a 32 kHz clock signal generated by an external circuit. The external signal must be connected to the 32K_XN pin. Additionally, a 1 nF capacitor must be placed between the 32K_XP pin and ground. In this case, the 32K_XP pin cannot be used as a GPIO pin.
Past ESP-IDF documents have indicated that the voltage should be between 0v6 and 1v0.
External 32kHz oscillator at 32K_XN pin: Allows using 32kHz clock generated by an external circuit. The external clock signal must be connected to the 32K_XN pin. The amplitude should be less than 1.2 V for sine wave signal and less than 1 V for square wave signal. Common mode voltage should be in the range of 0.1 < Vcm < 0.5xVamp, where Vamp is signal amplitude. Additionally, a 1 nF capacitor must be placed between the 32K_XP pin and ground. In this case, the 32K_XP pin cannot be used as a GPIO pin.
Current hardware guidelines don't even mention the external oscillator option (
https://docs.espressif.com/projects/esp ... -schematic)
The currrent ESP-IDF software documents (
https://docs.espressif.com/projects/esp ... _time.html) indicate:
External 32 kHz oscillator: Allows using a 32 kHz clock generated by an external circuit. The external clock signal must be connected to the external oscillator pin. The input amplitude must ensure that the digital circuit can correctly distinguish between logic high and low levels. Test results show that 1.7 V is the threshold between high and low levels. Therefore, make sure the input waveform has a peak value greater than 1.7 V and a minimum value lower than 1.7 V. For details on pin connections, please refer to the datasheet.
So what is the desired input voltage for the external oscillator?
MenuConfig is configured for an external oscillator and yet calls to rtc_clk_cal() often do not work

- ESP32_TCXO_XN.jpg (100.81 KiB) Viewed 153 times
I call rtc_clk_32k_enable_external(); and then repeatedly call rtc_clk_cal(RTC_CAL_32K_XTAL, 1000); which always (usually) returns 0.
Any help would be much appreciated.