This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTC config.... problem

Hello all,
I've got a bit of a problem.
I'm working with the LPC2138 and want to use the RTC. I configured it like it should..:
Setup:
MCB2130
Xtal: 12MHz,
CCLK: 60MHz,
PCLK: 30MHz,
MSEL = 5,
PSEL = 2,
VPBDIV = 0x02;
PREINT = 0x0392;
PREFRAC = 0x4380;
The IMSEC interrupt is set!

The interrrupt handler:
int RTC_interrupt (void)
{
if (IOSET1 & (1 << (16)))
{
IOCLR1 = 0xFF0000;
}
else
{
IOSET1 = 0x010000;
}
VICVectAddr = 0x00000000;
ILR = 0x01;
}

Now the problem...
If I know simulate this, an interrupt occurs after exactly 1.0000 sec.. but if I run it on the MCB2130 the interrupt occurs every 30.5us (32.768kHz).
What did I miss?
Can somebody pls help me?

Thanks,
Gerrit

0