This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP-L138 Timer Interrupt

Other Parts Discussed in Thread: OMAPL138

Previous Post:  e2e.ti.com/.../1765623

Right now I am trying to use Timer Interrupt to switch on/off GPIO. Here is part of the code:

/* Start the timer.  */
TimerEnable(SOC_TMR_2_REGS, TMR_TIMER12, TMR_ENABLE_CONT);

/*
** Setup the timer for 64 bit mode
*/
static void TimerSetUp64Bit(void)
{
    /* Configuration of Timer */
    TimerConfigure(SOC_TMR_2_REGS, TMR_CFG_64BIT_CLK_INT);

    /* Set the 64 bit timer period */
    TimerPeriodSet(SOC_TMR_2_REGS, TMR_TIMER12, TMR_PERIOD_LSB32);
    TimerPeriodSet(SOC_TMR_2_REGS, TMR_TIMER34, TMR_PERIOD_MSB32);
}

However, ~52kHz seems to be the upper limit for the timer interrupt and I cannot increase it further when I reduce TMR_PERIOD_LSB32. As I am looking to have an interrupt at ~MHz range, is there anything I can change to achieve that?

Also, I have a difficult time to look up for the base frequency of the Timer. What section/page of the Manual I should look into?

Thank you.

  • Dear Cheuk Yu,

    Also, I have a difficult time to look up for the base frequency of the Timer. What section/page of the Manual I should look into?

    Please refer to the PLL clock section of OMAPL138 TRM guide.

    Your code seems to be using the TIMER2 which is using PLL1_SYSCLK1 (150MHz)


    However, ~52kHz seems to be the upper limit for the timer interrupt and I cannot increase it further when I reduce TMR_PERIOD_LSB32. As I am looking to have an interrupt at ~MHz range, is there anything I can change to achieve that?

    You can generate interrupt more than 52KHz, but ISR should be very small... also timer APIs also take much clock cycles.

    Let me try and update you.