Jump to content
43oh

Real-Time Control - A C2000 Debugging Gem


Recommended Posts

If you are not familiar with the C2000 series, you are going to love this. C2000 silicon has something known as real-time control. This allows you to watch variables in "real -time" as it changes in your controller in your watch window, through the JTAG. I put real-time in quotes as the update speed depends on your JTAG speed and the amout of data being transferred.

I know this as I have worked with motor control alot and used the real-time feature to update FOC/current graphs in almost real time. This has been a god-send helping solve many problems.

 

Anyway, enabling this is simple. Just follow the steps below:

  1. Compile your program. I'm using Example_2802xLEDBlink.c from ControlSuite in the C2000 Launchpad folder.
     
  2. Once compiled, press the "Debug" button. post-1-14264717204417_thumb.png
     
  3. Next place the variable you want to check in the watch window. I used interruptCount++.post-1-14264717203971_thumb.png
     
  4. Next click the real time button(clock with a pause sign). The button next to it gets selected automatically.This is ok.post-1-14264717203837_thumb.png
     
  5. Now in the debug window, click the real time continuous refresh button above your watch window.post-1-1426471720374_thumb.png
     
  6. Place play, or run your program. The variable should automatically update.

Tips:

- You can change the refresh rate like below.

post-1-14264717203472_thumb.jpg

 

- There is something known as rude real time too, but I'm unable to find the setting. I'll update when I do.

- You can do funky stuff with it like display graphs etc in real time.

Link to post
Share on other sites

Isn't the purpose of the minimal configuration that it doesn't have fancy stuff like RTA built into it...? ;)

 

That said, I was never able to get something useful like the realtime profiling etc. options of SYS/BIOS to work on a C2000. All the docs I find are for C6000 and don't seem applicable for the much smaller C2000. Or maybe I'm just not smart enough... :D

 

Cheers

TomKraut

Link to post
Share on other sites

DSP/BIOS is version 5 of the RTOS, SYS/BIOS is version 6 and the latest version. All the BIOS stuff should work on C2000 and if it doesn't I know a few guys who would be very interested in any bugs you found.

 

Back to the topic though, Real Time Debug really is an awesome feature of our chips. I highly recommend you check it out.

Link to post
Share on other sites

I'm not 100% sure, but I think that the C2000 realtime debug interface is not supported as an RTA channel. You could use UART but it's more suited for C6000 and the like where you have an ethernet port. Then again, I could get my SYS/BIOS reporting agents confused... wasn't RTA the one that is considered legacy and should no longer be used?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...