This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
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
Elena,
The examples included with the Peripheral header examples will not run as-is on the simulator in CCS. The simulator requires specific configuration to simulate PIE, timer and other peripherals, which is discussed in the document SPRU608A.
CCS 3.3 includes some simulator examples that show how to configure simulated peripherals that can be used as a starting point. Please take a look at the examples in C:\CCStudio_v3.3\tutorial\sim28xx\pie and C:\CCStudio_v3.3\tutorial\sim28xx\timer. The CCS menu Help->Tutorial, "Configuring Simulated Peripherls" walks you through running these examples in CCS.
Regards,
Tim Love