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

xmega, systimer

  • 1
  • 2
  • Page 1 of 2
bgoolsby
 
Avatar
 
Subject:

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

 · 
Posted: 21.07.2013 - 12:56  ·  #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
Gender:
Location: Frankfurt Main / Germany
Posts: 1697
Registered: 02 / 2003
Subject:

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

 · 
Posted: 21.07.2013 - 13:09  ·  #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
 
Subject:

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

 · 
Posted: 21.07.2013 - 14:54  ·  #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
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

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

 · 
Posted: 21.07.2013 - 17:17  ·  #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
 
Subject:

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

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

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

 · 
Posted: 06.02.2014 - 16:53  ·  #6
Quote by 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
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

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

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

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

 · 
Posted: 06.02.2014 - 19:18  ·  #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
  • Page 1 of 2
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   132   146 · Page-Gen-Time: 0.031138s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI