Page 1 of 1

SAM4L AST Calendar mode RTC

Posted: Fri Sep 05, 2014 6:01 pm
by zarie
We are working on SAM4L custom board.
The SAM4L is cleared in PMCON forĀ OSC32K and in set to calendar mode with psel of 1Hz.
ast_conf.osc_type = AST_OSC_32KHZ
ast_conf.psel = AST_PSEL_32KHZ_1HZ
ast_conf.mode = AST_CALENDAR_MODE
An external XTAL of 32.768KHz is connected to the chip.

An AST periodic interrupt is set at a rate of 250msec for internal use, the AST Alarm interrupt is working and the calendar reading advances;
However in a period of 24hours the SAM4 RTC/Calendar if advancing too fast in approx of 10Sec, is shows a difference of 10 seconds in the future (with respect to an ntp synced clock) and it accumulates as time passes.
No Digital Tuner is used, AST->DTR is disabled.

Any ideas what might be the reason for the time diff ?
What is missing in a configuration ?