[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] Urgent clock-related questions
From: |
Rick Mann |
Subject: |
Re: [avr-chat] Urgent clock-related questions |
Date: |
Mon, 8 Apr 2013 13:03:06 -0700 |
On Apr 8, 2013, at 05:40 , Graham Davies <address@hidden> wrote:
> Rick Mann wrote:
>
>> ... I'm not sure I can calibrate the internal oscillators via DFLL using an
>> external crystal [on the XTAL pins] ...
>
> You can't. The only calibration sources for the DFLLs are the 32.768 kHz
> internal oscillator, the 32.768 kHz crystal oscillator using the TOSC pins
> and, for the 32 MHz DFLL only, the USB start-of-frame signal.
>
>> There doesn't seem to be a way to drive the RTC from the XTAL pins ...
>
> No.
>
>> ... nor can you calibrate the internal 32 kHz clock from an external crystal
>> (on XTAL1 & 2).
>
> Yes you can, but you have to do this with a firmware DFLL using the RC32KCAL
> register.
>
>> So, I guess the best thing is to just stick a 16 MHz crystal on the XTAL
>> pins and be done with it? I need USB. If I understand things correctly, I
>> can PLL that up to 96 MHz, then divide by 2 to get 48 MHz.
>
> This is correct. You could use any crystal or resonator that will multiply
> up to 48 or 96 MHz and meets your frequency accuracy requirements. However,
> the maximum CPU clock frequency will be 24 MHz. You could also generate the
> USB clock independently of the CPU clock using the DFLL to synchronize the 32
> MHz clock to the USB start-of-frame signal, which will cause it to run at 48
> MHz. Then you have more options available for the CPU clock. You do not say
> how accurate you need the CPU clock to be.
Thanks, Graham, it's very helpful to get confirmation.
I only need it to be "accurate enough" to do USB and serial reliably. A future
project that requires RTC will get a proper crystal for that, but this one
doesn't. So I'm putting in a MHz crystal and it should be fine.
--
Rick