basav t

RTC timing issue

Discussion created by basav t on Apr 3, 2010
Latest reply on Apr 3, 2010 by bigmac



I am using MC9S08DZ60 controller for my project and am configured RTC for 10 msec period interrupt generator. But am getting 12 msec. i.e 2 msec error. what could be the problem? clock input for RTC is 1-kHz internal low-power oscillator only  which is independent of MCG block. and the prescaler 8. tried with different configurations but error is persistent.


Here is my initialization code. 

#define RTC_MODULO      10 /*At 1KHz internal low power oscillator with prescaler 8 for 10ms interrupt */void bsp_rtc_init  ( void ){       bsp_io_rtcmod =  RTC_MODULO;     /*At 1KHz internal low power oscillator with prescaler %8 */        bsp_io_rtcsc = (BSP_IO_RTC_RTCLKS_1K_LPO | BSP_IO_RTC_RTIE | BSP_IO_RTC_RTCPS_DIV8);                                       /* Select clock,Setup prescalar, Enable interrupt. */}