Part Number: TMS320F28335
Tool/software: Code Composer Studio
Hi,
When I try to debug my ADCINT_ISR with CCS 8.2, it does not stop in a break point within the ISR.
I tried the following:
(1) AdcRegs.ADCTRL1.bit.SUSMOD = 3; which means ADC will stop immediately when a debugger hits a break point.
(2) pEPwmRegs->TBCTL.bit.FREE_SOFT = 0; so that the ePWM will stop as well. I use ePWM to trigger ADC SOC.
(3) I can see the ePWM counter is counting properly, and when CTR = 0, ADC sequence starts and finishes as designed.
(4) I check AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1, IER, and PieCtrlRegs.PIEIER1.bit.INTx6, so that interrupt is enabled.
(5) I run the programme in CCS, I can see the corresponding bits of PIEACK, PIEIFR1 and IFR set, when the ADC sequence finishes.
(6) I read some posts suggesting I need to include the following:
SetDBGIER(IER); // Configure the DBGIER for realtime debug
asm(" CLRC INTM, DBGM"); // Enable global interrupts and realtime debug
in the main file.
When I build the project, it shows an error of "unresolved symbol". It does not recognise SetDBRIER(IER) for some reason.
(7) Then I put
DINT;
asm(" PUSH IER");
asm(" POP DBGIER");
EINT;
asm(" CLRC INTM, DBGM");
When it is running, I can see DBGIER = IER = 0x0103 and INTM, DBGM bits of ST1 = 0, which enables the ADCINT (int1.6).
Still it does not stop within the ISR.
(8) I checked values of some variables in ISR. I believe when I am debugging, the ISR is never executed, because some variables never change.
Could anyone help me out? What registers did I forget to set, so that it will run the ISR? What settings/extra command lines do I need to include to allow for debugging? The project is working with hardware, but when I try to debug, it never enters the ISR. Why?