Precision Clocking the PIO, and adjustments without stopping block #11569
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
In the above, I was confused about the System clock, which is a PLL/Multiplied version of the Xtal. Nominal this is 125MHz, however the PLL can be adjusted. The following script is helpful in working out values to use: For example 120MHz is desired:
This, and the other 'light-bulb' moment that 29.97 is actually '30.0/1001.0 = 29.97002997003', gives me a much nicer target. Questions still remain how I can get the non-integer value through the |
Beta Was this translation helpful? Give feedback.
-
I've also noticed that the 12MHz XTAL could be replaced with something more precise: There seem to be a number of high precision (temp controlled) XTALs, but 12.8MHz seems to be more common than 12.0MHz. For example, quoting a Frequency Stability of ±280ppb:
If this hardware modification is done, would that then mean that the USB connection would not function (without adjustments)? USB is not important for the project, but I still need to be able to upload code... |
Beta Was this translation helpful? Give feedback.
You may change the divider in real time, including its fractional part. This will result in some single clock pulses introduced in the effective PIO clock so that the PIO clock effectively has the f_sys / (integer_div + fractional_div/256) frequency.
If the resulting frequency resolution is not precise enough you might regularly switch between different dividers, preferably between neighboring fractional values of the divider.
The resulting PIO clock will be effectively (i.e. in the long run) more precise and adjustable in finer…