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.

CLA & debug in CCStudio 3.3

Other Parts Discussed in Thread: CCSTUDIO

I'm using CCStudio 3.3.83.19 (limited version, codegen 5.2.1 and DSP/BIOS 5.33.05) and a Blackhawk USB2000 controller. I've installed the following emulation drivers:

- Driver Release v3.3.300.2, 23 JUN 2009
- CLA Driver Release v3.3.0.1, 07 JUL 2009

In the Code Composer Studio Setup I've chosen "Blackhawk USB2000 - F28035 CLA Controller". This gives me two targets in Parallel Debug Manager (TMS320C2800_0 and cla_0).

I'm able to open, build and load the example project "Example_2803xClaAdc" onto the main CPU. Debugging works well, and I know that CLA task 2 is executing as it triggers an interrupt when it finishes. I've put a "MDEBUGSTOP" into task #2, rebuilt the application and loaded it onto the target in order to be able to debug from that point in the CLA. I open the "Blackhawk USB2000 - F28035 CLA Controller/cla_0" from the Parallel Debug Manager and connect to the target (Alt+c). The Disassembly window is displayed and I see that the CLA has stopped at my MDEBUGSTOP instruction. Task #2 is triggered by an ADC interrupt set up in the main application. The CLA register window displays all the registers (all the MVECTx are displayed correctly). One thing I don't understand here is why the MIRUN register is 0000. Shouldn't it be 0001 since I've breaked the CLA in task #2?

The main problem is that I cannot single step through the instructions. If I try I get the following error:

Can't Single Step Target Program: Error 0x00000020/-2062 Error during: Execution, Cannot halt the processor

I have also tried to disable the ADC interrupt in the main application and explicitly forced task #2 to run by setting the MIFRC register to 0001. However, nothing happens. I would have expected the MIRUN register to change.

Any ideas?

  • Stian,

    I'm pretty sure the CLA is idle so it can not be stepped.

    One thing I don't understand here is why the MIRUN register is 0000. Shouldn't it be 0001 since I've breaked the CLA in task #2?

    Yes, if the CLA is executing a task MIRUN will have a bit set.  One condition that may cause confusion is if you have the MDEBUGSTOP as the first instruction in CLA address space.  The PC will be, by default, pointing to the first location after a reset.  So it may look like the PC has halted but instead the CLA is idle.

    Some thoughts:

    Writing a 0x0001 will set bit 0 of the flag register which corresponds to task 1, not task 2. Try writing 0x0002 to force task 2 (sets bit 1).

    Also make sure you run the main C28x application far enough so that the CLA is completely configured.

    Another thing to check is that the MIER register is configured to allow the CLA to service the appropriate task.

    There is a debug FAQ that you may find helpful:

    http://tiexpressdsp.com/index.php/Control_Law_Accelerator_(C2000_CLA)_Debug_on_CCS_v3.3_FAQ

    And also a short debug demo:

    http://community.ti.com/media/p/28209.aspx

    -Lori

  • Thanks. I played around a little bit more and found that if I ran Debug->Reset CPU on the CLA end it started working. The CLA halted in task #2 and I was able to single step. The main CPU was running and causing task #2 to trigger at this time.