eclipsecode-composer

How can I view a graph of a signal in Code Composer?


Based on this document, section 6 it looks like I should be able to view a graph of a signal. I have Code Composer 6, so its different than these instructions. I click View -> Other and then type graph. But when I click on the Discrete Line Graph I see its view very briefly appear near some of the other toolbars and then immediately disappear. If it helps, Code Composer is based on a version of Eclipse, and it seems like its an IDE problem, unless I have to do some sort of setup to get it to display.


Solution

  • The way to view a graph of a signal would be to attach a graph to the variable (array) that stores the signal.

    Lets assume you are using the F28335 Processor which has RAM Banks L0 - L7 available. Lets also assume you are using RAML0 to store the signal data, now RAML0 is 4096 words long, therefore, you would typically have a 4096 sized array within your code that 'lives' in RAML0.

    This is how you would set this up in code:

    #define RXDATASIZE      4096                    // Number of data or L0 and L1 bank
    #pragma DATA_SECTION(RXdataCH1, "DPRAML0")
    UINT16 RXdataCH1[RXDATASIZE];                   // Copied data for Carrier Detect DSP Mode.
    

    And within your .cmd file you would have:

     DPRAML0                : > RAML0,     PAGE = 1         // For CH1 DSP/FFT processing
    

    The .cmd file is a file that allows you to specify where variables 'live' within the memory architecture.

    Now, as you populate the RAM Bank you have access to the values via the RXdataCH1 array. To see the values at runtime, you need to add RXdataCH1 to the Expressions window. From here you will right click on the Variable within the Expressions list and choose 'Graph'.

    Now, when you run in Debug mode you will see the contents of the Variable within the Graph at runtime. You may have to tweak some of the settings in the Graph Properties, for example the number of datapoints you wish to view - the default it 200 but I often set this to the array size - 4096.

    This is a really useful feature which allows a visual representation of sampled signals for example.

    Hope this helps.