Part Number: TMS320F28379S
Dear E2E Forum,
I am using a TMS320F28379S in a digital power control application and have encountered a strange problem.
I have an ISR running at 50kHz which executes code for a control law using Driver lib functions like DCL_runPID_C1 to form the PID control. An external CANBUS command turns the control on. This all works fine when I have the system running from the XDS200 debug pod.
When I remove the debugger and cycle power, the system wakes up and operates. However, now when I send a CANBUS command to turn on, the code hangs.
I have narrowed this down to the problem being the code in the ISR rather than the CANBUS. If I comment out the code in the ISR, the CANBUS command is still received and the ISR executes but no crash.
My feeling is that there is something in the code which means that when we run without the debugger, then the code in the ISR executes much more slowly and cannot complete within the 20us required before the interrupt fires again.
Would the debugger connected cause some code to execute from a different type of on-chip memory. Could this be an issue with the memory linker file putting code into the wrong memory sections?
Open to other ideas too but the key thing here is the different in program execution with and without the XDS200 connected. Here is a grab of the code which is activated inside the ISR which leads to the issue:-
Thanks,
Iain