2009-06-03 11:51 AM
REAL TIME CLOCK (RTC) read problem
2011-05-17 04:13 AM
Has anyone seen an issue (and found a solution) for millisecond read greater than 999 bcd.
See attached for details. [ This message was edited by: jonathan.peterson on 03-06-2009 16:07 ]2011-05-17 04:13 AM
The RTC registers are not in BCD they're binary.
I use this code to create millisecond resolution timestamps. secs = RTC_GetCounter(); ms = 1000 * ((RTC_XTAL_FREQUENCY - 1) - RTC_GetDivider()) / RTC_XTAL_FREQUENCY; I use the Standard Peripheral Library v3.0.0 functions instead of direct register accesses.