OK, it seems my counter/prescaler settings for initial and reload
count value are ignored or used for first shot only, so it seems
something is wrong in my initialisation code:
DMTimer2ModuleClkConfig();
IntMasterIRQEnable();
IntAINTCInit();
IntRegister(SYS_INT_TINT2, isr_func);
IntPrioritySet(SYS_INT_TINT2, 0, AINTC_HOSTINT_ROUTE_IRQ);
IntSystemEnable(SYS_INT_TINT2);
/* Load the counter with the initial count value */
DMTimerCounterSet(SOC_DMTIMER_2_REGS,0xFFFFFFF9);
/* Load the load register with the reload count value */
DMTimerReloadSet(SOC_DMTIMER_2_REGS, 0xFFFFFFF9);
/* Configure the DMTimer for Auto-reload and overflow mode */
DMTimerModeConfigure(SOC_DMTIMER_2_REGS, DMTIMER_AUTORLD_NOCMP_ENABLE);
DMTimerIntEnable(SOC_DMTIMER_2_REGS, DMTIMER_INT_OVF_EN_FLAG);
DMTimerEnable(SOC_DMTIMER_2_REGS);
And the ISR:
static void isr_func()
{
static int clockCtr=0;
static int ledCtr=0;
// DMTimerIntDisable(SOC_DMTIMER_2_REGS, DMTIMER_INT_OVF_EN_FLAG);
// DMTimerIntStatusClear(SOC_DMTIMER_2_REGS, DMTIMER_INT_OVF_IT_FLAG);
ledCtr++;
clockCtr++;
// some code here...
/* Re-enable the DMTimer interrupt */
// DMTimerIntEnable(SOC_DMTIMER_2_REGS, DMTIMER_INT_OVF_EN_FLAG);