I have several questions about create a new timer problems by using CSL on 6616 chip :
1. In my opinion there are two methods to create a new timer one is using CSL the other is using Timer_create with cfg configuration file
my question about this is what is the difference between these two methods? Is it ok to use CSL method?
2. Now I am using CSL to create a new timer and I met two problems
(1) when I execute the code I can not see the timer I want to create with ROV view and I also can not enter timer ISR .
the following is the create timer process: In this test I want timer 5 to link to event 68 and hwi 12.
void SYS_Init_Timer(void)
{
// initialize timer register value
/* set the timer mode to unchained dual mode */
hwSetup.tmrTimerMode = CSL_TMR_TIMMODE_DUAL_UNCHAINED;
hwSetup.tmrTimerPeriodLo = 0xffffffff; // this should be a countdown in case we select EXT SRC
hwSetup.tmrClksrcLo =CSL_TMR_CLKSRC_TMRINP; // source external
memset(&sys_timer_data[2].ObjTmr, 0, sizeof(CSL_TmrObj));
sys_timer_data[2].hTmr = CSL_tmrOpen(&sys_timer_data[2].ObjTmr, CSL_TMR_5 , NULL, &status);
status = CSL_tmrGetHwSetup(sys_timer_data[2].hTmr, &hwSetup);
/* Stop the GP Timer */
CSL_TmrResetLo(sys_timer_data[2].hTmr);
/* set the timer mode to unchained dual mode */
hwSetup.tmrTimerMode = CSL_TMR_TIMMODE_DUAL_UNCHAINED;
hwSetup.tmrTimerPeriodLo = (125*850/6)/*SYS_TIMER5_TRACE_SEND_PERIOD*/;
CSL_tmrHwSetup(sys_timer_data[2].hTmr, &hwSetup);
// add timer5 ISR and link timer 5 event to hwi 12
sysE_hwi_intSetup.intVectId = CSL_INTC_VECTID_12;
sysE_hwi_intSetup.sysEvtCount = 1;
sysE_hwi_intSetup.sysEvtId[0] = CSL_GEM_TINT5L;
sysE_hwi_intSetup.pCallbackFxn = (void(*)(void*)) &SYS_Timer5_Isr;
sysE_hwi_intSetup.pCallbackArg = 0;
sysE_hwi_intSetup.bEnable = 1;
( void ) Interrupt_add_with_mask ( &sysE_hwi_intSetup, 0xFFF0 & ~((1<<6)|(1<<7)) );
// Start the timer 5
CSL_TmrStartLo(sys_timer_data[2].hTmr, CSL_TMR_ENAMODE_CONT);
}
(2) when I using EVM board 6614 to do the test timer 5 has linked to event 9 and hwi 13 which supposed should be event 68 and hwi 12.
(It is right when I used TI simulator to do the test . Timer 5 linked to event 68 and hwi 13 )