AnsweredAssumed Answered

Timer IRQ setup?

Question asked by Laz on May 3, 2010
Latest reply on May 6, 2010 by Laz

I'm on the Blackfin 561, with VDSP 5.o Update 6.  I copied this code from one of the examples, but I don't get any IRQs.  I need to reassign the TImer7 to IVG13, as the I2C library is hard coded to IVG10 (default).  I'm sure I'm forgetting something silly...

 

void initTimers (void)
{
// timer7 is the 1mSec tick timer
   
    *pTIMER7_CONFIG = (PWM_OUT | PULSE_HI | OUT_DIS | IRQ_ENA);
    *pTIMER7_PERIOD = TICKS_PER_MSEC;
    *pTIMER7_WIDTH = (TICKS_PER_MSEC/10); // 10% pulse

*pTMRS8_ENABLE = TIMEN7; // enable the timer

// the I2C handler is on IVG10!
register_handler(ik_ivg13, timerISR);  // assign ISR to interrupt vector

*pSICA_IAR5 = Peripheral_IVG(42,13);  // assign interrupt channel 42 Timer7 to IVG8

*pILAT |= EVT_IVG13;      // clear pending IVG8 interrupts
ssync();
*pSICA_IMASK1 |= SIC_MASK(42 % 32);  // un-mask the IRQ
ssync();

}

Outcomes