Tool/software: TI-RTOS
SDK: processor_sdk_rtos_am57xx_5_00_00_15
Hello,
We want to use timer 15 on processor 5726. To initialize the timer, use the code below
app.cfg
var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer'); var IntXbar = xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar'); var TimerSupport = xdc.useModule('ti.sysbios.family.shared.vayu.TimerSupport'); TimerSupport.availMask |= (0x1 << 14); IntXbar.connectMeta(47, 341); Timer.timerSettings[14].intNum = 70;
main.c
Void myIsr15(Void) { Log_info0("myIsr15"); } static void TimerPRCMConfigure(void) { HW_WR_REG32(SOC_L4PER_CM_CORE_BASE + CM_L4PER3_TIMER15_CLKCTRL, 0x2); while ((HW_RD_REG32(SOC_L4PER_CM_CORE_BASE + CM_L4PER3_TIMER15_CLKCTRL) & (0x00030000)) != 0x0) ; } Int main() { Error_Block eb; Error_init(&eb); TimerPRCMConfigure(); Timer_Handle timerHandle; Timer_Params timerParams; Timer_Params_init(&timerParams); timerParams.period = 1000; /* 1 ms */ timerParams.periodType = Timer_PeriodType_MICROSECS; timerParams.arg = 1; timerParams.runMode = Timer_RunMode_CONTINUOUS; timerHandle = Timer_create(14, myIsr15, &timerParams, &eb); if (timerHandle == NULL) { Log_info0("Timer create failed"); } BIOS_start(); /* does not return */ return(0); }
At debugging In CCS it is visible that the timer 15 goes but function myIsr15 is not called.
When the timer 2 is initialized in function Timer_create instead of timer 15, the function myIsr15 is called up. If you do not turn off the power and running this code with the timer 2 and then run this code with timer 15 - function myIsr15 called. But after turning off the power and running code with timer 15 - function myIsr15 not called
Tell me what to do to make the timer 15 work correctly
Thanks