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.

TMS320F28388D: CLA Debug Issue

Part Number: TMS320F28388D

Hello TI Team, 

Iam NIkileshwar. Iam using TMS320F28388D C2000 controller for my UPS apllication. I am reading and doin RMS calculations in CLA and Sending to CPU.

Firstly the debug is not stopping in CLA task even though iam using __mdebugstop() enabled in the code. the CLA is been shown running in the debug page.

Please hepl me in rectifing the problem, since i am not able to understand where the problem is.

Please Find the image.

Thanks in advance,

V Nikileshwar

image.png

  • I suspect the CPU never reaches the __mdebugstop() instruction. Check that the task is really the one running. You can view the MIRUN register... or even better pull a GPIO high at the start of the task and low after the _mdebugstop() to indicate (1) did it start and (2) did it go past the mdebugstop.

  • Hi Lori, 

    Thanks for the support.

    I had missed to enable the EPWM interrupt to trigger the CLA task. After doing that, the cla is halted at  __mdebugstop().

    Here again comes the problem. I had done as  you suggested to pull the GPIO high to low in the CLA task. I am doing step by step debug, the code for which I had used GPIO high to low got stuck at one point and its not going forward. I attached the concerned image below and marked it with red color to find where it is getting stuck.

    i also configured the gpio control to cla core using GPIO_setControllerCore() function.

    please guide me to solve this.

    thanks in advance.

  • If you run, instead of step, does it still get stuck? I suspect the mod (%) function is the problem. It takes a lot of cycles on the cla because the CLA does not have the hardware instructions to accelerate the % function. If you figure out what the pinMask is, you can bypass this code and write to the register directly.

  • As an example, example that writes to the GPIOA data reg bit 0 

    HWREG(GPIODATA_BASE + GPIO_O_GPADAT) &= 0x0001;

  • Hi Lori, 

    the problem is solved .

    Thanks for your support.