AnsweredAssumed Answered

Interrupt generation - BF506F

Question asked by srelee on Jul 20, 2010
Latest reply on Aug 18, 2010 by HEGDE

Hello,

 

I am using BF506F blackfin processor, to generate a interrupt for every 10u sec. I wrote two functions Init_Timers and Init_Interrupts.

 

The code is as follows :

#define TIMEOUT_PERIOB 3333;

 

void main(void)

{

Init_Timers();

Init_Interruots();

}

 

void Init_Timers(void)
{     //*pTIMER_STATUS      = 0x00000000;
*pTIMER0_CONFIG          = 0x001D;
*pTIMER0_PERIOD          = TIMEOUT_PERIOD;
*pTIMER0_WIDTH          = TIMEOUT_PERIOD/2;     // width = period/2 = 50% duty cycle
*pTIMER_ENABLE          = 0x0001;
//     *pTIMER_STATUS      = 0x00000000;
*pTIMER_DISABLE          = 0x0000;
}
void Init_Timer_Interrupts(void)
{
// assign core IDs to interrupts
//*pSIC_IAR0 = 0xffffffff;
//*pSIC_IAR1 = 0xffffffff;
//*pSIC_IAR2 = 0xfffffff4;
*pSIC_IAR4 = 0x0000000f;                         // Timer0 -> ID4;
// assign ISRs to interrupt vectors
register_handler(ik_ivg12, Timer0_ISR);          // Timer0 ISR -> IVG 11
// enable Timer0 interrupt
*pSIC_IMASK1 = 0x00000001;
//     test_acm();
}
EX_INTERRUPT_HANDLER(Timer0_ISR)
{
//*pTIMER_STATUS = 0x0001;
test_acm();
}

 

 

After executing the above code, I can see the counter incrementing, but the program is not generating the interrupt properly.

Do I need to make any changes for the above code, to get the interrupt.

 

Please help me ...!!

 

Thanks,

Sree

Outcomes