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.

Graphical display



Hi all,

I am trying to debug some code using the graphical display on code composer studio v3.3 using code generated from simulink. 

However, every address I input gives me nothing I can make sense of. So I built a simple adc dac circuit and ran the code. It works as it should but when working with the graphical display, the program does not work. I just hear beeps at the output, hear beeps when I hit refresh the graphical display, the graphical display does not update real time, and the input and output addresses of the code give me nonsense.

PLEASE HELP

  • andy g said:
    It works as it should but when working with the graphical display, the program does not work. I just hear beeps at the output, hear beeps when I hit refresh the graphical display, the graphical display does not update real time, and the input and output addresses of the code give me nonsense.

    As you noted, the graph does not update in real-time. When you refresh the graph, it will HALT the target momentarily so a memory read can occur to update the graph. That is why your program is behaving incorrectly, because of the intrusion.

    If you are using a device that supports real-time mode (like 28x), you can enable it so CCS can make non-intrusive accesses to memory.

    for more information on real-time mode, see:

    http://processors.wiki.ti.com/images/9/94/RTMD.pdf

    Thanks

    ki

  • Ok it is running on polite real time but I am still getting nonsense.

    I am using the OMAP L137 EVMC6747

    this inout.c file was generated in the source library

    ------------------------------------------------------------------------------------------------------------------------------------------------------

    #include "inout.h"
    #include "inout_private.h"

    /* Real-time model */
    RT_MODEL_inout inout_M_;
    RT_MODEL_inout *const inout_M = &inout_M_;

    /* Model step function */
    void inout_step(void)
    {
    /* local block i/o variables */
    int16_T rtb_ADC[128];

    /* S-Function (c6747evm_adc_sfcn): '<Root>/ADC' */
    adcRecv( rtb_ADC, inout_ConstP.ADC_p2, inout_ConstP.ADC_p3);

    /* S-Function (c6747evm_dac_sfcn): '<Root>/DAC' */
    dacXmt( rtb_ADC, inout_P.DAC_p2);
    }

    /* Model initialize function */
    void inout_initialize(void)
    {
    /* Registration code */

    /* initialize error status */
    rtmSetErrorStatus(inout_M, (NULL));

    /* S-Function (c6747evm_adc_sfcn): <Root>/ADC */
    adcCodecInit( inout_P.ADC_p1, inout_ConstP.ADC_p2);

    /* S-Function (c6747evm_dac_sfcn): <Root>/DAC */
    dacCodecInit( inout_P.DAC_p1, inout_P.DAC_p2);
    }

    /* Model terminate function */
    void inout_terminate(void)
    {
    /* (no terminate code required) */
    }

    /*
    * File trailer for generated code.
    *
    * [EOF]
    */

    -----------------------------------------------------------------------------------------------------------------------------------------------------------

    When I graph the addresses of the ADC and DAC (&inout_P.DAC_p1, &inout_P.DAC_p2, etc) I still get the same nonsense. Below are the time and freq domain graphs of address &inout_P.DAC_p2 and the graphs do not change when I speak into the microphone input. I've checked all the addresses in the code and every output is similar, if not the same to these. 

    I am not good at coding and using this as a method of debugging. 

    What am i doing wrong??

  • can someone help

  • Hi..I've faced the same problem today.

    After a couple of hours of study I've found a solution:

    See the attachment for details.

    Have a nice day.

    // put the following code in "filename_main.c"

    // -----made in india by dmpandit@gmail------

     //--------------------put at beginning--------------------

    // Global Variables (put at beginning)

    // decide no of samples:

    // for a 50Hertz sine wave at Ts = 1e-5 sample time, I'll have (1/50)/(1e-5) = 2000 samples per cycle

     int32_T out_buffer[2000];     //buffer for graphs = number of sample points to be seen at a single view in graph

    const short BUFFERLENGTH = 2000;     //size of buffer = same as above

    short ii = 0;                                           // counter

     //--------------------put at the end of "void rt_OneStep(void)" function--------------------

    // after overrunflag--; instruction

    // replace "test_plot_B.sineWave" by "filename_B.watchVariable"

     out_buffer[ii] = test_plot_B.sineWave;

    ii++;

    if(ii==BUFFERLENGTH)

                ii = 0;

     //--do the following now---

    // file-->save

    // project-->rebuild all

    // file-->load program-->filename.out

    // view-->graph-->time-frequency

     // debug-->real time refresh

    // run

    // hip hip hurray!

    dataIO_rev2.rtf