Minimizing clock drift on Kinetis microcontroller

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Minimizing clock drift on Kinetis microcontroller

896 Views
rampsr
Contributor III

I'm using the Kinetis MKL05Z microcontroller and trying to minimize the amount of clock drift from device to device. Here's the situation:

I've got a product that uses the Kinetis microcontroller (L Series) and when the product is turned on, four pins send out PWM signals and change their duty cycles in a repetitive pattern with the period of the pattern lasting several seconds. After several minutes, each device drifts out of sync from one another. Eventually the devices can become 180 degrees out of phase. These devices are independent of one another so there is currently no way to share common signal between them. Also, the PCB temperature around the microcontroller may see up to 90 degrees Celsius at times.So I notice the clock drift gets a lot worse at elevated temperatures (at least according to my oscilloscope).

So that's my situation without getting very detailed. Basically, I have timers running and want to know if there is a trick to always end up with a constant, dependable, and precise timer where each microcontroller (from device to device) ends up at the same counter value after minutes or even hours of running.

Someone mentioned Phased Locked Loop, or something like that, but I don't know much about that.

Thanks,

0 Kudos
3 Replies

540 Views
ndavies
Contributor V

Without synchronization between the modules, This basically boils down to how accurate your source clock or crystal is. The more accurate the clock you feed into it, the more accurate the time out of it.

Even the most accurate clock sources in the world are going to drift against one another. The question becomes how much drift is tolerable. Is it a second a day, a second a month or a second a millennium?

The accuracy of Clock chips is rated in parts per million. You want a very low PPM clock source.

0 Kudos

540 Views
andychernock
Contributor III

I'd like to add to this issue if I may...what if the product was designed to use an internal clock only...what techniques have been developed to reduce the amount of clock drift when using ONLY the internal reference clocks?   Thank you for your time.

0 Kudos

540 Views
ndavies
Contributor V

Some internal clocks can be trimmed. This can be done by your end of line flash programmer or a test tool.

Unfortunately, It still boils down to the quality of the clock source. The internal clocks are not very accurate when compared to an external crystal or clock IC. Trimming them will get you close at room temperature on your desk, Put them out in a hot vehicle under high sun load and those clocks are going to be all over the place.

What you use for the clock source depends on how accurate you need the clock to be. If you need highly accurate synchronization you need to pay for a highly accurate clock source.

0 Kudos