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.

CCS/TMS320F28335: GUI Composer line graph

Part Number: TMS320F28335


Tool/software: Code Composer Studio

Hi,

I use gui composer v1 in order to watch two signals in one line graph. The problem is that the signals are not synchronized. In the code which I have made with Simulink I insert two matrices' variables and  I feed thes variables with the appropriate signals [Set point(yellow line) and Feedback (red line)]. I have also changed "continuous refresh interval" and "refresh rate" [ value:pm.$refresh_interval] but the output was  almost the same. There is a phase shift between the signals. I also noticed that when I use large matrices the output is not correct.  Is there any solution?

Thank you

  • Hi Kostas,
    Can you export your GCv1 solution and share it with me? I'd like to take a closer look

    Thanks
    ki
  • Hi Kostas,
    Solution to make this work is possible. However, it is not a simple solution that can be made by tweaking some parameter.

    First some background information: GUI Composer and CCS Desktop will read memory through JTAG reading it in blocks, thus requesting a chunk of memory (e.g. variable stores one of you matrices) can span multiple CPU cycles. There are no guarantees that ensure that large memory read is atomic. Setting a refresh interval also does not guarantee that a memory read happens exactly in that interval. As an example if refresh interval is set to 100ms and memory read takes 50ms, then it is reasonable to expect reads will be triggered around 100ms. However, if read takes 115ms, then they will be done in as fast as possible manner. I am assuming that your firmware also has some periodicity as to how frequently it updates two matrices that you are interested in. Depending on timing, you might be skipping samples or getting partially processed samples.

    There are two ways that I can think of working around this:
    a) Add some sort of double buffering scheme with boolean flags that control when data is read and when data can be processed. After data is processed, it is copied to a second buffer and read flag is enabled. GUI will poll on this flag to read when flag is on, then when it is done it turns this flag off which is a signal for firmware to process next sample.

    b) Add a monitor to firmware that can stream entire data set over UART. i.e. firmware would be something like ProcessData, sendData in a loop. GUI Composer app would be then created that consumes streams of data. This should work as effectively sendData pauses processing of new sample until data is sent. However, it should still be faster than option a). Here is document that describes how to create GCv1 app that consumes streaming data. It is more involved than creating an app that visualizes global variables.
    processors.wiki.ti.com/.../Streaming_GuiComposer

    Martin