Using RTC32 as RTCsource on Xmega256A3BU

RTC32, A3BU

bgoolsby
 
Avatar
 
Subject:

Using RTC32 as RTCsource on Xmega256A3BU

 · 
Posted: 11.03.2014 - 21:58  ·  #1
I am using an Xmega256A3BU in an application. I have an external 32.768KHz crystal and battery backup installed. This chip has the battery backup functions and a 32-bit RTC module. I have the RTC32 working; i.e. I can read the RTC32 CNT register and verify that it updates once/second and that it continues to count when the main power is off.

I want to use RTC32 as the RTCsource for AVRco's RTclock driver. Is this possible? Doing this would enable me to use the date and time functions provided by RTclock and have the clock keep running during power down.
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Using RTC32 as RTCsource on Xmega256A3BU

 · 
Posted: 15.03.2014 - 13:56  ·  #2
Hi,
sorry, with XMegas only the SysTick can be used as a source for the RTC at this time.
But what do you expect from the hardware RTC timer? This part is counting up every
second. But this doesn't help if the CPU is sleeping. So this timer must do an interrupt
every second/tick and then update the AVRco RTC and then going to sleep again.
If this is what you expect we can extend our RTC so that in such an interrupt the
RTC driver can be called and the become updated.

But you must setup the hardware RTC timer by yourself and program this interrupt
and sleep sequence by your own.

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   50   64 · Page-Gen-Time: 0.028279s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI