avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] XMEGA clocking questions


From: Graham Davies
Subject: Re: [avr-chat] XMEGA clocking questions
Date: Thu, 14 Mar 2013 08:38:51 -0400

Rick Mann wrote


It seems that it's really not necessary to include a crystal in XMEGA-based designs, even if using the USART or USB, is that correct? The XPLAINED boards only have a 32kHz crystal, I assume for good real timekeeping.

That is correct, although if you have a 32.768kHz crystal, you might as well use it.

Or do they rely on that and the PLL to generate accurate peripheral and USB clock frequencies?

It's not the PLL, its the DFLLs. They can synchronize the 2MHz and 32MHz internal oscillators to some other more accurate source. Then you generate the peripheral and system clocks from these oscillators. For USARTs, you can use the internal 32.768kHz clock as the reference. It is factory calibrated to +/- 0.5%, drifts over temperature from 0 to 85 degrees C by about another 0.5% and over voltage from 1.8 to 3.3 V by perhaps 0.2%. So in many practical cases this is accurate enough for a UART, though, again, if you have a 32.768kHz crystal, there is no reason not to use this as the frequency source for the DFLL.

For USB, you re-purpose the 32MHz internal oscillator and use its DFLL to increase its frequency to 40MHz and synchronize it to the Start-of-Frame packet on the USB bus. This cannot be used as the CPU clock, so you use (for example) the 2MHz oscillator as the basis for that and the PLL can then increase the frequency to any multiple, including 32MHz. (Note that Atmel training sometimes gives a different story for USB clocking, however that is not correct; I am 100% certain that what I just wrote is the real situation.)

Graham Davies
ECROS Technology.
AVR Consultant #13660.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]