RTC Calendar not matching the reality

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi everybody. I am currently working on an Atmel SAML21J, and I would like to do precise time operations : have repetitive events at precise moments.

To do so I am currently trying to implement the RTC Calendar (polled) from the ASF. It is working perfectly, except that time doesn't grow in a realy way : there is 9 seconds spend in reality, and the calendar was only incremented by 5. There is no time difference between the value and the reality time in the provided example though.

 

I am aware that it could be a clock problem, but I don't really understand the clock configurations so I would like some help on that.

As complementary informations, I am also using FreeRTOS and 3 heavy tasks in this same project (I don't know, maybe the fact that there is a lot ran at the same time makes the counter... slower ?)

 

Thanks for the help guys.