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.

TMS320F280039C: Variables cannot be updated in the expression and variables window.

Part Number: TMS320F280039C

Hi C2000 team.

Some variables cannot be updated in the expression, variable window and memory viewer.

Sometimes it works as if the proper data has been written to the variable, but the variable has not been updated in CCS.

Or it behaves as if no value was written.

  • Hello,

    Looking at your screenshot all the variables shown seem valid. If you're referring specifically to the variable stored at 0xC2BC, please keep in mind that device memory is little endian, so the lower part of the value is stored first; if you change the format/data type of the Memory Browser to be unsigned long like the variable Frequency_Hz then you should see the same value.

    If you want to make sure that the variable values line up with what's seen in the Memory Browser, make sure the data types/formats used are the same and either manually click the 'Refresh' button or select the 'Continuous Refresh' button to make sure everything is updated correctly from the device.

    Best regards,

    Omer Amir

  • Hello,

    We initially suspected it was a CCS version issue, but this continues to happen regardless of the version of CCS.

    We have installed and tested all version from CCS v12.1 to CCS v12.4, but this problem still occurs in all versions.

    One question is, this problem only occurs on the customer's PC.

    When I tested the same project file on my PC, there is no problem.

    We've tested several PCs of the customer, but the same problem occurs.

  • Hello,

    If the customer steps through the code that alters the variable, it doesn't show the reflected change in the expressions window when Continuous Refresh is selected to be on, correct?

    If this is the case, verify that there are no optimizations enabled in the Project Properties, as this can optimize away some debug capabilities.

    Best regards,

    Omer Amir

  • Hi, 

    Could you support privately using private message?

    This is a very critical issue for us.

    You need the code to understand the question, but this is confidential.

    Please help me.

  • You can send me the code privately, I will respond here if I can determine the issue without needing to cite the code (for other customer's reference).

    Best regards,

    Omer Amir

  • Hi, 

    We have found the cause of this issue.

    The cause is the XDS emulator type.

    Customer uses the XDS100v3 emulator and when using this, sometimes variables were not updated.

    But when debugging with xds110, this problem does not occur.

    Does the XDS100v3 support F28003x?

  • Hi,

    XDS100v3 does support the F28003x. I'm not sure why this issue occurs, but it may be related to the increased bandwidth of the XDS110 when compared to the XDS100. I think these two debug probes also use very different software.  

    Best Regards,

    Ben Collier

  • I am trying out an XDS100v2 with my F280039C controlcard (+dock). I do not see issues with updating values via the expressions or memory browser views. I tried both stop mode and real-time.

    Perhaps my example is too light or there is something specific to the customer's application.

    Can the customer provide a test case that I can try on my end? It doesn't have to be the actual project but something stripped down and simplified, as long as the issue can be reproduced.

    Thanks

    ki

  • Hi Ki,

    Customer once told me that the problem appeared as the code size got bigger and more complex.

    If the code that causes the problem is run step by step, the problem does not appear.

    However, if a breakpoint is set on line 55 and resume, line 28, 29 are not executed normally.

    temp1, temp2 are 32-bit unsigned integer variables, but only the lower 16-bit data is copied as follows.

    pt_pwm->tNextArguments.Frequency_Hz is 0x186A0 on line 55.

    If so, the temp1 should also be 0x186A0, but only 0x86A0 is copied as following expression window.

    I add .OUT file for test.

    After downloading and running, You will be able to see problem by changing the tPwm[0].tNextArguments.Frequency_Hz in the expression window.

    However, I couldn't check if the problem appeared because I didn't have a F280039C controlcard (+dock).

    I only checked if the .out file is working on the F280039C launch pad.

    F280037_v2.zip

    Thanks.

  • temp1, temp2 are 32-bit unsigned integer variables, but only the lower 16-bit data is copied as follows.

    I wonder if this is related to:

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1066512/tms320f280049c-ccs-expression-window-wrong-value

    The last post in the thread by Darian is the key explanation:

    This is happening because the debugger is not reading the two words atomically, and as such, if the write happens between the two reads, the value will be one of the two incorrect values.

    A 16-bit read may be forced by the debugger memory. A quick test would be to modify the f280039.gel file line 332 to specify an access size of 4:

    In the other thread, this change resolved the issue as the debugger was able to make 32-bit reads.

    If that does not resolve the issue, can you provide the source files for the out file that you provided? It is hard to debug without the source. You can send via private E2E message if you do not want to post publicly.

    Thanks

    ki