Hello,
I am currently developing a C baremetal application using a BeagleBone Black Rev C board, using a JTAG header and a XDS100 debugger, the processor is a Sitara AM3358 and I use the latest Code Composer Studio IDE v6 from TI and StarterWare libraries.
Perhaps someone could lend me a hand in an issue with interrupts, I've been looking at this for a few hours with no sucess and I have no idea what could be the problem. I have little experience with other ARM microcontrollers from ST and I though the transition would be easier but the currently is becomming a bit of a pain hehe
The problem is the flow never jumps to the interrupt handler. I have already checked and the timer itself works ok, it goes from the initial count to the overflow value and reloads again, however the overflow interrupt never generates, at least the flow never goes to the interrupt handler. I believe I've managed to isolate the problem to the interrupt part as I've tried with RTC with interrupts and the flow never jumps to the interrupt handler.
This is the code I have, mostly made of the examples provided in the StarterWare, it should be self explanatory. I've also doing the interrupt configuration first and changing the order of operations but that didn't work. The order of operations should be the same as the one on the TI wiki.
/* DMTimer clocks */ DMTimer2ModuleClkConfig(); /* Configure the DMTimer for Auto-reload and compare mode */ DMTimerModeConfigure(SOC_DMTIMER_2_REGS, DMTIMER_AUTORLD_NOCMP_ENABLE); /* Load the counter with the initial count value */ DMTimerCounterSet(SOC_DMTIMER_2_REGS, 0xFF000000u); /* Load the load register with the reload count value */ DMTimerReloadSet(SOC_DMTIMER_2_REGS, 0xFF000000u); /* Enable the DMTimer interrupts */ DMTimerIntEnable(SOC_DMTIMER_2_REGS, DMTIMER_INT_OVF_EN_FLAG); /* Start the DMTimer */ DMTimerEnable(SOC_DMTIMER_2_REGS); IntAINTCInit(); /* Registering DMTimerIsr */ IntRegister(SYS_INT_TINT2, DMTimerIsr); /* Set the priority */ IntPrioritySet(SYS_INT_TINT2, 4, AINTC_HOSTINT_ROUTE_IRQ); /* Enable the system interrupt */ IntSystemEnable(SYS_INT_TINT2); /* Enable IRQ in CPSR */ IntMasterIRQEnable();
This code was taken from an example, so I guess I am missing something. I am currently reading the reference manual and the interrupt registers and continue from there, but I would appreciate any comments on this.
Thanks in advance!