Other Parts Discussed in Thread: C2000WARE,
Greetings,
I am setting up a project to use Timer 2 to generate a periodic interrupt. The interrupt is disabled at the timer (TIE), and in the core registers IER, and INTM. I can run the code and watch the timer run. When it decrements to 0, TIF is set, PRD is loaded into TIM, and the count down begins again – all as expected.
But when the interrupt from the timer (TIE) is enabled (IER and INTM are still disabled), once TIM has been decremented to 0, the code stops at an ESTOP0 instruction in the TI bootloader at address 0x3fe493. No interrupt should have occurred, but the code was ready if it did. But the interrupt routine never executed. The setup is as follows:
- The interrupt routine is a C routine prefaced by the “__interrupt” keyword.
- The interrupt routine increments a counter and exits.
- All locations in the interrupt vector table (0xD00 – 0xEFF) are pointing to the interrupt routine.
- Core Registers.ST1.INTM is 1
- Core Registers.IER.INT14 is 0
- CpuTimer2Regs.TCR.TIE is 1
What could I have done to cause the code to wind up in the TI bootloader?
Thank you,
Ed