DFLLext does no longer works with int32MHZ clock

Jeroen.Vandezande
 
Avatar
 
Subject:

DFLLext does no longer works with int32MHZ clock

 · 
Posted: 21.10.2014 - 16:44  ·  #1
version 5.04.89

The OSCtype line used to work fine in previous versions of the compiler but after upgrading I get a compiler error on that line now:
"Error: Error: 12 Parameter DFLL can be used only with in2MHz and int32Mhz."

Code
program Test;
{$NOSHADOW}
{ $WG}                     {global Warnings off}

Device = xmega64A3, VCC=5;
{ $BOOTRST $08000}         {Reset Jump to $08000}

Import SysTick;

From System Import ;


Define
  OSCtype        = int32MHz,
                   PLLmul=4,
                   prescB=1,
                   prescC=1,
                   DFLLext;
  SysTick        = 10;             {msec}
  StackSize      = $0064, iData;
  FrameSize      = $0064, iData;

Implementation

{$IDATA}

{--------------------------------------------------------------}
{ Type Declarations }

type


{--------------------------------------------------------------}
{ Const Declarations }

{--------------------------------------------------------------}
{ Var Declarations }
{$IDATA}


{--------------------------------------------------------------}
{ functions }



{--------------------------------------------------------------}
{ Main Program }
{$IDATA}

begin
  loop


  endloop;
end Test.
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: DFLLext does no longer works with int32MHZ clock

 · 
Posted: 21.10.2014 - 21:39  ·  #2
Hello,

there is no DFLLext with internal oscillators.
Remove this define and it will work.

rolf
Jeroen.Vandezande
 
Avatar
 
Subject:

Re: DFLLext does no longer works with int32MHZ clock

 · 
Posted: 22.10.2014 - 09:09  ·  #3
Hi rolf,

I am a bit confused now...
according to the AVRco manual:
Quote
The internal oscillatoren can be calibrated automatically and continously. To forces this there are two DFLLs.
If the internal 32kHz oscillator should be used for this so the option DFLLint must be used. If the oscillator
type ext32kHz is active then the alternate option DFLLext can be used.


That is what I want to do, We have an external 32.768kHz crystal that should be used to calibrate the internal 32 MHz clock that drives the MCU.

We use async communications so an accurate clock is important.

How should the OSCtype line look then in my situation ?

Best Regards,

Jeroen
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: DFLLext does no longer works with int32MHZ clock

 · 
Posted: 22.10.2014 - 17:38  ·  #4
Hello Jeroen,

at first, you don't define an external Oscillator:

Define
OSCtype = int32MHz,


so, your extDFLL is unnecessary and must fail.

secondly, the XMega internal oscillators are highly precise and very
sufficient for any async operations. An external clock or osc is
absolutely unnecessary! So also the internal USB doesn't need an
external clock!

rolf
Jeroen.Vandezande
 
Avatar
 
Subject:

Re: DFLLext does no longer works with int32MHZ clock

 · 
Posted: 23.10.2014 - 09:26  ·  #5
Hi rolf,

This is what the Xmega Datasheet says:
Quote
Two built-in Digital Frequency Locked Loops (DFLLs) can be used to improve the accuracy of
the 2 MHz and 32 MHz internal oscillators. The DFLL compares the oscillator frequency with a
more accurate reference clock to do automatic run-time calibration of the oscillator. The choices
for the reference clock sources are:
• 32.768 kHz Calibrated Internal Oscillator
• 32.768 kHz Crystal Oscillator connected to the TOSC pins


We have the 32.768 kHz Crystal Oscillator connected to the TOSC pins on our boards so we would like to use them...

If you removed this functionality form the compiler is there a way to download an older version of the AVRCo compiler? (because we have been using this feature now with AVRCo for a couple of years)

Best Regards,

Jeroen Vandezande
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: DFLLext does no longer works with int32MHZ clock

 · 
Posted: 23.10.2014 - 12:53  ·  #6
Hello Jeroen,

sorry, sorry, you imported the internal 32MHz OSC by this define:

Define
OSCtype = int32MHz,

so your externally connected 32kHz is not used. And the define
extDFLL
is not applicable here. The compiler should have raised an error,
but it seems that the older version didn't do that. But the actual
AVRco raises this correct error!

We are using the very, very precise internal 32kHz oscillator
and uses this for calibrating the int32MHz osc. Using the ext
32kHz is not usable anymore with AVRco.

Please note again that the XMega internal OSCs are very precise
and fully sufficient for asyncs and most other hardware/drivers.

rolf
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   108   122 · Page-Gen-Time: 0.025658s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI