Seconds Auxiliary Interrupt

I have set my system timers to generate interrupts at 10Hz (MSINT) and 1HZ (SECINT). The millisecond interrupt is triggered immediately after reset but the seconds interrupt takes some time before it starts to trigger (about 15s). After that it triggers every second, as desired.

I have set up the timers as follows:

void InitSysTimer(void)
{

// Set millisecond timer
   MSECH = 0x73;
   MSECL = 0x32;

// Set hundred millisecond clock
   HMSEC = 99;

// Set interrupt frequency
   SECINT = 0x89;
   MSINT  = 0xE3;

// Enable interrupt
   AIE = 0x90;
   EAI = 1;

// Power on system timers
   PDCON &= 0xFD;

}

Is there a reason the seconds interrupt takes so long to be called?

Thanks,
Paul

More questions in this forum