Calculating Timer

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Marius05 on Fri Oct 07 09:56:26 MST 2011
I have some Problem with calculating the right timer frequency.

I am using the LPC-Xpresso1769 Rev B

My Clock should be 100 MHz
#define PLL0CFG_Val           0x00050063
#define CCLKCFG_Val         0x00000003
The clock division is 4
#define PCLKSEL0_Val          0x00000000
So the timer clock should run with 25 MHz

But if I enable my timer

It runs to slow.
Actually I have to reduze the the timer down to 23500000 to get arround 1 sek per overflow.
What is wrong in my calculation?