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.

Timer interrupts in DSPBIOS

Hi everyone!

I'm working on OMAPL137. A basic function I want to implement is to trigger AD conversion every 100us. When I use DSP core without DSPBIOS I can implement it by hardware interrupt of TIMER0:

void setupTIMER0 (void)
{
/* Interrupt Controller Register Overlay */
CSL_DspintcRegsOvly intcRegs = (CSL_DspintcRegsOvly)CSL_INTC_0_REGS;
/* Clear TIM12 register */
CSL_FINST(tmr0Regs->TIM12,TMR_TIM12_TIM12,RESETVAL);

/* Select 32 bit unchained mode */
/* Take the timer out of reset and set the pre-scalar count for 3:4 */
tmr0Regs->TGCR = CSL_FMKT(TMR_TGCR_TIMMODE,32BIT_UNCHAIN)
| CSL_FMKT(TMR_TGCR_TIM12RS,NO_RESET)
| CSL_FMKT(TMR_TGCR_TIM34RS,NO_RESET)
| CSL_FMK(TMR_TGCR_PSC34,0x1);

/* Set timer0 PRD1:2 */
CSL_FINS(tmr0Regs->PRD12,TMR_PRD12_PRD12,TIMER_PERIOD);

/* connect the event to the interrupt 4,5,6 and 7 */
CSL_FINS(intcRegs->INTMUX1, DSPINTC_INTMUX1_INTSEL4,TIMER_EVENT0);

/* set ISTP to point to the vector table address */
ISTP = (unsigned int)intcVectorTable;

/* clear all interrupts, bits 4 thru 15 */
ICR = 0xFFF0;

/* enable the bits for non maskable interrupt and */
IER = 0xF2;

/* enable interrupts, set GIE bit */
// _enable_interrupts();

delay(100);

/* Enable TIMER0 1:2 side, continuously mode */
CSL_FINST(tmr0Regs->TCR,TMR_TCR_ENAMODE12,EN_CONT); //EN_CONT=2
}

However, when I use DSPBIOS (I insert the program into 'loop' example in DSPLINK)the program didn't work. Why there is not any interrupts?

Do I have to use HWI or CLK to implement the function? Is there any example of HWI?