XJLink2 is the only JTAG interface that can accurately measure frequency.

Why Measure Frequencies?

Often in products oscillators are used, for instance in USB you require an oscillator to be within 100 ppm. With crystals this is seen as easy, but it can be a little harder than you expect. A standard crystal may be accurate to +/- 30 ppm with a temperature stability of +/- 50 ppm and an ageing of +/-5 ppm per year. So in the worst case we are at 85 ppm after the first year. Now add on the effects from tolerances of the load capacitors (often 22 pF or 33 pF) and you might be over the limit!

Low power devices often use crystals which specify lower load capacitances but which are as a result more sensitive to errors in load capacitance. These errors can come from the capacitors themselves (tolerance), track layout and IC capacitance. At manufacture you might want to check the crystal is operating at the correct frequency or close to it. XJLink2 is able to measure up to 18 frequencies with an accuracy of 10 ppm. In fact, typically at room temperature this is 2 ppm.

For the above USB case we might in the factory be happy with a product that is +/-40 ppm. This still gives a little margin for temperature and ageing of the crystal. Frequency measurement will find errors such as wrong load capacitors or crystal used. If a wrong crystal is fitted it could be the wrong frequency part or more subtly could be a 12 pF load capacitance crystal used instead of a 33 pF load capacitance crystal.

If you have the wrong crystal (not frequency but load capacitance) the oscillator may not even start. More likely is the situation in which it will oscillate but at the wrong frequency. If it does this in the USB case the product may not enumerate correctly on all PCs to which the product is connected to, which might cause a customer support issue.


Measuring Frequencies

To measure a frequency all you need to do is connect up the signal you would like to measure to a spare IO pin on the XJLink2 connector. Don’t connect the crystal directly to the connector because the capacitive loading of the cable will change the frequency. Fortunately most devices that use crystals can output a frequency. It doesn’t have to be the same frequency as the crystal to measure the ppm error, so if for instance a processor has a crystal oscillating at 24 MHz but can output 48 MHz this will be fine for measuring the ppm error.

For EMC reasons you might like to turn off the output when not testing the product. You might use another spare output from the XJLink2 if required to enable the frequency only during testing.