Content originally posted in LPCWare by suckiden on Mon Dec 01 04:52:40 MST 2014 Hi everybody,
currently I am playing with the timer of the lpc. I want to generate an interrupt every 2us. As a starting point I used the periph_timer example. It already has the following line of code in it:
timerFreq = Chip_Clock_GetSystemClockRate();
it returns 96 000 000 so I know my processor and timer are both running at 96MHz Than I tried a bit of math: 1/96 000 000 = 10,416...ns (desired value) 2000ns / 10,416.. ns = ~192 so I set the Prescaler to this value and Match value to 1 so every 2us an interrupt should occur. I measured the output of the board LED0 and got a value of 16us not really what I expected. I played a bit with the Prescale values an figured out that with 24 I get the right result. Could it be that the real timer clock is 12MHz (96MHz/8) ? When yes, where can I find this settings?