Hello,
I am trying to run my application on a simulator of C280x. The code has been compiled with no errors, but the code never enter the interrupt service routines of Timer 1 and Timer 2.
I have set the following bits to enable interrupts on Timer1 and 2:
CpuTimer1Regs.TCR.bit.TIE = 1;
CpuTimer2Regs.TCR.bit.TIE = 1;
IER = IER | (0x3000); //enable int14 (Timer2) and int13 (Timer1)
Do I have to set also
DBGIER = DBGIER | (0x3000); ?
Is it correct to clear the interrupt flag with the instructions
CpuTimer1Regs.TCR.bit.TIF = 1; /* Clear Timer1 Interrupt Flag (writing 1 clears the flag) */
CpuTimer2Regs.TCR.bit.TIF = 1; /* Clear Timer2 Interrupt Flag (writing 1 clears the flag) */
IFR = 0x0000; ?
Do I have also to state
asm(" clrc INTM")
to globally enable interrupts ?
Can someone help me?
Thank you!
Elena