Hi,
as far as I've understood, Wifi and BT will only work with the default (40MHz?) clock frequency.
If I'm ok without Wifi and BT, can I simply connect a 10MHz OCXO as a external clock source to a ESP32?
Thanks
pit
OCXO as a Clock Source
Re: OCXO as a Clock Source
In theory, you can (i.e. the chip will start up, load code from flash, etc).
However software assumes that only certain frequencies of XTAL are ever used, namely 40, 26, 24 MHz. If you feed 10MHz as input, then
a) the code which figures out XTAL frequency will fail:
https://github.com/espressif/esp-idf/bl ... #L469-L494
b) the code which configures the PLL may not be able to enable PLL because the parameters needed for 10MHz input will likely be different from the ones for 40/26/24 MHz.
https://github.com/espressif/esp-idf/bl ... clk.c#L224
(workaround: remove these parts of code and don't enable PLL at all:
https://github.com/espressif/esp-idf/bl ... /clk.c#L78
https://github.com/espressif/esp-idf/bl ... #L634-L646
)
c) all timekeeping code (system_get_time, gettimeofday, RTOS ticks) will be using incorrect dividers.
https://github.com/espressif/esp-idf/bl ... #L261-L264
https://github.com/espressif/esp-idf/bl ... time.c#L84
https://github.com/espressif/esp-idf/bl ... nfig.h#L99
It is not impossible to work around this, but this is not something we will likely support out of the box.
However software assumes that only certain frequencies of XTAL are ever used, namely 40, 26, 24 MHz. If you feed 10MHz as input, then
a) the code which figures out XTAL frequency will fail:
https://github.com/espressif/esp-idf/bl ... #L469-L494
b) the code which configures the PLL may not be able to enable PLL because the parameters needed for 10MHz input will likely be different from the ones for 40/26/24 MHz.
https://github.com/espressif/esp-idf/bl ... clk.c#L224
(workaround: remove these parts of code and don't enable PLL at all:
https://github.com/espressif/esp-idf/bl ... /clk.c#L78
https://github.com/espressif/esp-idf/bl ... #L634-L646
)
c) all timekeeping code (system_get_time, gettimeofday, RTOS ticks) will be using incorrect dividers.
https://github.com/espressif/esp-idf/bl ... #L261-L264
https://github.com/espressif/esp-idf/bl ... time.c#L84
https://github.com/espressif/esp-idf/bl ... nfig.h#L99
It is not impossible to work around this, but this is not something we will likely support out of the box.
Re: OCXO as a Clock Source
Thanks!
So I should opt for a 40, 26 or 24 MHz OCXO
So I should opt for a 40, 26 or 24 MHz OCXO
Re: OCXO as a Clock Source
I recommend using 40MHz as that is the most tested at this point.
26 is okay as long as you don't use WiFi (see another thread on this forum about 26 MHz support with wifi/bt).
26 is okay as long as you don't use WiFi (see another thread on this forum about 26 MHz support with wifi/bt).
Re: OCXO as a Clock Source
Finally got a 26MHz OCXO in my hands \o/
I want to remove the 26MHz Xtal of my ESP32-Thing and feed the ESP with the clock signal from the OCXO.
However, I seem to be unable to find specific information in the datasheet or hardware design guide on how to operate the ESP32 with an external oscillator.
Would I connect my OCXO's signal output simply to the XTAL_P (External crystal input), and leave XTAL_N (External crystal output) unconnected? Or does _N need to be treated with a capacitor to ground, like so:
Thanks for help
pit
I want to remove the 26MHz Xtal of my ESP32-Thing and feed the ESP with the clock signal from the OCXO.
However, I seem to be unable to find specific information in the datasheet or hardware design guide on how to operate the ESP32 with an external oscillator.
Would I connect my OCXO's signal output simply to the XTAL_P (External crystal input), and leave XTAL_N (External crystal output) unconnected? Or does _N need to be treated with a capacitor to ground, like so:
Thanks for help
pit
Re: OCXO as a Clock Source
You can leave XTAL_N unconnected.0xPIT# wrote: Would I connect my OCXO's signal output simply to the XTAL_P (External crystal input), and leave XTAL_N (External crystal output) unconnected? Or does _N need to be treated with a capacitor to ground, like so:
Who is online
Users browsing this forum: No registered users and 191 guests