Jump to content
Sign in to follow this  
msptest6

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.

Share this post


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

Share this post


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.

Share this post


Link to post
Share on other sites

Yes, it works with minimal, but doesn't leave much room for RTA, and once I cut down the buffers to make it fit I couldn't get printf log to update... might be me, I'm still figuring out this stuff but it looks cool.

 

Sent from my DROID4 using Xparent SkyBlue Tapatalk 2

Share this post


Link to post
Share on other sites

A test to display a live temperature graph. The chip is pretty warm, so much so that when I place my finger on it, the temp. goes down - meaning my finger is acting as a heat sink. The temp value is the first value of the temperature array. Pretty cool.

 

post-1-14264717204484_thumb.png

Share this post


Link to post
Share on other sites

Got the printf logs and RTA to work with the Idle Example... scrapped the task example I was trying to get to work (never did, dunno).. Displays the printf logs now as it should in RTA, but only when I pause the debugging, regardless of what options I check/uncheck :-\

Share this post


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?

Share this post


Link to post
Share on other sites

Ya, I'm not sure about how RTA exports data back, but I think it typically needs the CPU to be stopped. ROV is the other one and I think it may be able to export data while the device is running, but I'm not sure.

Share this post


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.

Sign in to follow this  

×
×
  • Create New...