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.

TMDSCNCD263: RTI timer overflow issue

Part Number: TMDSCNCD263

Tool/software:

Hi ,

I am using RTI module for am263x-cc board. I want to test RTI overflow interrupt, so i have configured pre-scalar value to 1, and RTI clock frequency 200Mhz. But i am not getting the overflow interrupt though FRC value is updating to 0xFFFFFFFF and again restarting from 0.

My code looks like this.


/* Configure Counter block 0 */
cntrPrescaler = 1;
RTI_counterConfigure(baseAddr, RTI_TMR_CNT_BLK_INDEX_0, RTI_TMR_CLK_SRC_COUNTER, RTI_TMR_NTU_0, cntrPrescaler);
RTI_captureConfig(baseAddr, RTI_TMR_CNT_BLK_INDEX_0, RTI_TMR_CAPTURE_EVT_0);

 

RTI_intStatusClear(CONFIG_RTI0_BASE_ADDR, RTI_TMR_INT_OVL0_FLAG);
HwiP_Params_init(&rtiHwiParams);
rtiHwiParams.intNum = CONFIG_RTI0_INT_NUM_EVENT0;
rtiHwiParams.callback = RTI_overFlowIntrIsr;
rtiHwiParams.isPulse = 0;
rtiHwiParams.priority = 4;
rtiHwiParams.args = testParams;
status = HwiP_construct(&gRtiEvent0HwiObj[CONFIG_RTI0], &rtiHwiParams);
DebugP_assertNoLog(status==SystemP_SUCCESS);

RTI_intEnable(CONFIG_RTI0_BASE_ADDR, RTI_TMR_INT_OVL0_FLAG);

RTI_intDisable(CONFIG_RTI0_BASE_ADDR, RTI_TMR_INT_DMA0_FLAG);

/* Start the RTI counter */
(void)RTI_counterEnable(CONFIG_RTI0_BASE_ADDR, RTI_TMR_CNT_BLK_INDEX_0);

DebugP_log("Timer Started, Observe the LED will be turned off after over flow!!!\r\n");

/* Wait until the LED will be turned off after overflow */
while(gBlinkCount == 0);

/* Stop the RTI counter */
(void)RTI_counterDisable(CONFIG_RTI0_BASE_ADDR, RTI_TMR_CNT_BLK_INDEX_0);

DebugP_log("Timer Stopped...\r\n");
And I have ISR function where i will disable the RTI interrupt and call the ISR function:
void RTI_overFlowIntrIsr(void *args)
{
RTI_TestParams *testParams = (RTI_TestParams*)args;
rtiOverFlowEvent();
RTI_intStatusClear(CONFIG_RTI0_BASE_ADDR, RTI_TMR_INT_OVL0_FLAG);
HwiP_clearInt(CONFIG_RTI0_INT_NUM_EVENT0);
}
But i am not able to get the overflow interrupt, can any RTI expert can help here?
 
Regards,
Anil