Clock out? Clock sync with the system

fernando306
Posts: 10
Joined: Wed Sep 05, 2018 11:19 pm

Clock out? Clock sync with the system

Postby fernando306 » Thu Sep 06, 2018 12:37 pm

Hello my friends,

Is there anyway to have the ESP32 output a clock to synchronize with the rest of the system?
It is good practice to have everything running from the same clock source rather than having multiple crystals / oscillator on the same PCB.
A 12MHz output would be desirable.

Any suggestions are highly appreciated! :)

Thank you!

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

Re: Clock out? Clock sync with the system

Postby ESP_Sprite » Fri Sep 07, 2018 1:59 am

It is good practice to have everything running from the same clock source rather than having multiple crystals / oscillator on the same PCB.
How so? You may save some money on separate crystals, but from an EMC PoV, I'd assume it's better to have separate local oscillators. Most protocols don't mind because they're self-clocked.

However, if you still want this, you can probably use one of the PWM peripherals for this. They derive their clock from the internal 80MHz APB clock (given the ESP32 is not in any kind of sleep) and you can divide that down. Alternatively, to generate any random frequency, you can use the internal APLL.

fernando306
Posts: 10
Joined: Wed Sep 05, 2018 11:19 pm

Re: Clock out? Clock sync with the system

Postby fernando306 » Thu Sep 13, 2018 3:05 am

Hey my friend,

Thank you for your answer. Since I will have some audio stuff on the same PCB, it is good to run everything clock synchronized in order to avoid audible noise issues. I've had that kind of problem before, a slight deviation between two identical crystals caused an annoying background noise.

Who is online

Users browsing this forum: No registered users and 110 guests