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

Timer Interrupt

I am working on a project wherein LPC2468 is being used with CCLK = 72MHz. With this frequency, I used following two options:
>> PCLKSEL1.PCLK_TIMER3 = 0x2
Here the Clock of timer3 runs @ CCLK/2 = 36MHz with a resolution of 27.78ns
I load the T3MR0 with 3600d to generate a Interrupt on Timer3 every 100us

>> PCLKSEL1.PCLK_TIMER3 = 0x1
Here the Clock of timer3 runs @ CCLK = 72MHz with a resolution of 13.88ns
I load the T3MR0 with 7200d to generate a Interrupt on Timer3 every 100us

The Timer init code is as follows:
T3TCR = 0x02; /* Stop the timer */
T3PR = 0x0; /* Set prescaler to zero */
T3IR = 0x01; /* Clear Int flag of MR0 */
T3MCR = 0x03; /* Interrupt is generated when MR0 matches TC and TC is cleared */
T3MR0 = /* 3600 or 7200 depending on if I choose Option 1 or Option 2 */
T3TCR = 0x01; /* Start the timer */

Other Setting includes
>> PCONP.PCTIM3 = 1
>> Interrupts being configured through VICIntEnable registers.

Requirement:
I need to collect the data sent over the USB ( 56bytes per USB frame ) and then at every 100us, I need to transmit it in a form of a CAN message, for this I am using Timer3 to generate an Interrupt for me at every 100us, since other Timers Timer0/1/2 are used up by other applications.

Obtained Result:
I am capturing the CAN message over a CANalyzer and I see that minimum recurrence during which I get the CAN message is 240us.
Any ticks values equalent to time >=240us loaded in T3MR0, works fine but not the values for <240us

I need assistance for this issue. During this operation interrupts related to USB rx, CAN tx and Timer 3 are enabled.

I want to know what I have missed in my code due to which I am not able to generate Timer03 interrupt.

0