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.

定时器事件捕获模式下如何触发溢出中断



定时器事件捕获模式下定时器为24位,事件可以触发中断,但不能触发溢出中断

要捕获长间隔信号24位计时不够,想用溢出中断延伸,但溢出不能触发.

int main()
{

//
// Initialize Board configurations
//
BoardInit();

//
// Pinmux for UART
//
PinMuxConfig();

//
// Configuring UART
//
InitTerm();

//
// Display Application Banner
//
DisplayBanner(APP_NAME);

//
// Enable pull down
//
MAP_PinConfigSet(PIN_05,PIN_TYPE_STD_PD,PIN_STRENGTH_6MA);


//
// Register timer interrupt hander
//
MAP_TimerIntRegister(TIMERA2_BASE,TIMER_A,Timer2AIntHandler);

//
// Configure the timer in edge count mode
//
MAP_TimerConfigure(TIMERA2_BASE, (TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_CAP_TIME_UP));

//
// Set the detection edge
//
MAP_TimerControlEvent(TIMERA2_BASE,TIMER_A,TIMER_EVENT_POS_EDGE);

//
// Set the reload value
//

MAP_TimerPrescaleSet(TIMERA2_BASE,TIMER_A,0Xff);


//
// Enable capture event interrupt
//
MAP_TimerIntEnable(TIMERA2_BASE,TIMER_CAPA_EVENT|TIMER_TIMA_TIMEOUT ); //定时器中断使能捕获和溢出

// Enable Timer
//
MAP_TimerEnable(TIMERA2_BASE,TIMER_A);


while(1)
{
//
// Report the calculate frequency
//
// Report("Frequency : %d Hz\n\n\r",g_ulFreq);

//
// Delay loop
//
MAP_UtilsDelay(80000000/5);
}
}