Which timer/counters are used by the compiler in Xmega chips?

xmega, systimer

  • 1
  • 2
  • Seite 1 von 2
bgoolsby
 
Avatar
 
Betreff:

Which timer/counters are used by the compiler in Xmega chips?

 · 
Gepostet: 21.07.2013 - 12:56 Uhr  ·  #1
Which of the Xmega hardware timer/counters are used by the compiler when you import Systimer? Conversely, which are free for us to use in programs?
Gunter
Administrator
Avatar
Geschlecht:
Herkunft: Frankfurt Main / Germany
Beiträge: 1697
Dabei seit: 02 / 2003
Betreff:

Re: Which timer/counters are used by the compiler in Xmega chips?

 · 
Gepostet: 21.07.2013 - 13:09 Uhr  ·  #2
see DocuCompiler.pdf, chapters 4.18.7.1 and 4.18.7.2 !
Gunter


A "SysTimer" is based on the SysTick. So no additional hardware timer is involved.
But think of the resolution and precision of the SysTick. It is not very high and
so not usable for real timing functions.

If you need a more precise one, you can use the "TickTimer" which then needs a
separate 16bit timer.

rolf
bgoolsby
 
Avatar
 
Betreff:

Re: Which timer/counters are used by the compiler in Xmega chips?

 · 
Gepostet: 21.07.2013 - 14:54 Uhr  ·  #3
If Systick is imported, it uses one of the timers, correct? On the Mega chips I think this is Timer0. On the Xmegas, does it use TCC0?

Also, I note that the new Xmega E5 doesn't have TCC0; it has TCC4, TCC5 and TCD5.
rh
Administrator
Avatar
Geschlecht:
Herkunft: Germany
Alter: 25
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: Which timer/counters are used by the compiler in Xmega chips?

 · 
Gepostet: 21.07.2013 - 17:17 Uhr  ·  #4
With XMegas the SysTick uses the 16bit RTC Timer "RTC".
If this timer is not present any other of the standard timers
can be used. Please read the compiler manual as Gunter wrote.

Also the E5 series have the RTC timer/counter usable for SysTick.

rolf
bgoolsby
 
Avatar
 
Betreff:

Re: Which timer/counters are used by the compiler in Xmega chips?

 · 
Gepostet: 21.07.2013 - 17:28 Uhr  ·  #5
OK, I read the compiler pages and understand now. Thanks.
bgoolsby
 
Avatar
 
Betreff:

Re: Which timer/counters are used by the compiler in Xmega chips?

 · 
Gepostet: 06.02.2014 - 16:53 Uhr  ·  #6
Zitat geschrieben von rh

With XMegas the SysTick uses the 16bit RTC Timer "RTC".
If this timer is not present any other of the standard timers
can be used. Please read the compiler manual as Gunter wrote.

Also the E5 series have the RTC timer/counter usable for SysTick.

rolf


What if the Xmega does have an RTC, like the Xmega256A3U? Can I still use a standard timer if I want to by using the code in the compiler manual, "4.18.7.2 XMega SYSTICK without RTC Timer"?
rh
Administrator
Avatar
Geschlecht:
Herkunft: Germany
Alter: 25
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: Which timer/counters are used by the compiler in Xmega chips?

 · 
Gepostet: 06.02.2014 - 18:47 Uhr  ·  #7
yes, you can do it. But what do you expect from this?
bgoolsby
 
Avatar
 
Betreff:

Re: Which timer/counters are used by the compiler in Xmega chips?

 · 
Gepostet: 06.02.2014 - 19:18 Uhr  ·  #8
The RTC timer is 1.024ms, not exactly 1ms. I was thinking of getting more exact timing with one of the conventional TC's. How much adjustment can the "adj" option make to the RTC? Can that make it exactly 1ms?
  • 1
  • 2
  • Seite 1 von 2
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 17 · Cache Hits: 14   132   146 · Page-Gen-Time: 0.034094s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI