Tool/software: Code Composer Studio
I try to init CLA but when my program go to line 46 in below picture ; it jume to illegal interrupt and i can debug this ; please help me
thank and best regard !
my code!400Hz_NPC_CAN_BANG_TU.rar
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.
Tool/software: Code Composer Studio
I try to init CLA but when my program go to line 46 in below picture ; it jume to illegal interrupt and i can debug this ; please help me
thank and best regard !
my code!400Hz_NPC_CAN_BANG_TU.rar
Anh,
There is nothing obvious about the line you highlighted that should cause an illegal trap. Please try the following:
T:ST0 ACC P AR1:AR0 DP:ST1 DBGSTAT:IER Return Addr empty < SP points here (even or odd address)
Regards
Lori
Dear Lori;
-When 1 comment out Estop and for(;;) loop PC come to TIMER1_ISR() like first picture below.
-sorry i dont understand your ideal about ( ISR inspect the stack)
- I see linker cmd and map file but I cant find any thing wrong.
-in second picture below ; the illigeal interrupt occor when I step into line 46
Thank you very very much;
Tuan Anh
anh nguyen said:-in second picture below ; the illigeal interrupt occor when I step into line 46
I think you mean line 40 or 41?
Line 40 is assigning the LS4 memory block to the CLA but it is also the memory block that the C28x is fetching opcodes from (i.e. C28x program is running from 0xa1b9 which is LS4 - refer to the memory map in the device datasheet).
Refer to the information for local shared RAM and the CLAPGM bits (section 6.3.5.2 Local Shared RAM (LSx RAM) of the TRM). I believe for the configuration you have LS4 is only available to the CLA and no longer available to the C28x for code execution. Thus when the next instruction is executed the C28x takes an illegal trap.
Regards
Lori
dear MR Lori;
That illegal trap disappeared; but NOW my CLA1 task1 not run but the CLA1_1 interrupt executed .
I trigger CLA1 task by adcb_int1 and i see adcb_int1 flag has been set.
Can you give me some recommend ?
Regards
Anh
Anh,
It is strange that the CLA issued a CPU interrupt but it didn't execute.
How are you determining that the task didn't run? If you put a breakpoint in the task (mdebugstop) does the CLA halt on it?
What is the CLA PC (MPC) value when the C28x CPU takes the interrupt? Does it correspond to the MSTOP instruction of the CLA task?
Regards
Lori
Dear Mr Lori
I Have explained how I determine task do not run in another post !
Thank you very much !
Tuan anh