Hi,Mario
Yes, Use timer timing and generate interrupts, If I do not use this function vAHI_InterruptSetPriority API, it will not be able to respond normally to the interrupt generated by the timer -- that is, cannot enter the callback function. So,I just want to know, is this function vAHI_InterruptSetPriority necessary for interrupts? The manual is not very detailed, I am a bit confused. The following is my code.
PUBLIC void Timer_Init()
{
vAHI_TimerEnable(E_AHI_TIMER_1,10,FALSE,TRUE,TRUE);//timer1,Low-2-High
vAHI_TimerConfigureOutputs(E_AHI_TIMER_1,FALSE,TRUE);
vAHI_TimerStartRepeat(E_AHI_TIMER_1,7813,15625);//1s //101
vAHI_Timer1RegisterCallback(Timer1_callback);
//vAHI_InterruptSetPriority(MICRO_ISR_MASK_TMR1,5);
DBG_vPrintf(TRUE, "\n\nTimer_Init()... .\n");
}
PUBLIC void Timer1_callback(uint32 u32DeviceId,uint32 u32ItemBitmap)
{
(void)u8AHI_TimerFired(E_AHI_TIMER_1);//clear interrupt flag
DBG_vPrintf(TRUE, "\n.Timer1 Interrupt handling.... .\n");
}
Tanks!
Regards,
hs