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.

TMS320F28388D: CCS Expressions window show invalid value (long) with continuous refresh

Part Number: TMS320F28388D
Other Parts Discussed in Thread: TMDSCNCD28388D

Hi, experts

I have a question about CCS ( Version: 11.2.0.00007 ).

I monitor SDFM output data(32-bit) with CCS Expressions window with continuous refresh=ON. 

Like below

Inputs to SDFM (sdfm21_in_s32g) are around zero (from -100 to +100).

However on Expression windows sometimes show that sdfm21_in_s32g is around +655xx / - 655xx.

And I set BP on below but it is not hit. 

And I change threshold value and it is always hit

It means that BP  works correct but Expression window shows in-correct data ?

This behavior of CCS means that Expressions window has a problem with continuous refresh=on.

It does not support 32-bit value with continuous refresh=ON.

When output value is changed from - 4 to + 4 , sdfm21_in_s32g is changed from below.

0xFFFF_FFFC

0x0000_00004

If lower 16-bit is not changed, sdfm21_in_s32g is 0x0000_FFFC(=65532).

I think that a 32-bit value on the Expressions window is updated with a step of 16-bit data size.

 

When output value is changed from + 4 to - 4 , sdfm21_in_s32g is changed from below.

0x0000_00004

0xFFFF_FFFC

If lower 16-bit is not changed, sdfm21_in_s32g is 0xFFFF_0004( = -65532).

Best regards,

Hidehiko

  • Hi Ki-san,

    Thank you for your information.

    This behavior is an known issue as https://sir.ext.ti.com/jira/browse/EXT_EP-10722.

    CCS Expressions window sometimes shows an invalid value (32-bit) when Continuous Refresh is enabled.

    Is it right ?

    Because CCS / JTAG interface scans a data with 1 word (16-bit data in C2000 series ) .

    long data is changed from -4 to +4

    0xFFFF_FFFC(=-4) -> 0x0000_00004(+4)

    16-bit (Little endian)

    Address :  N, N+1

    Memory : FFFC, FFFF

    Sequence 

    1) CCS read 16-bit data with "Address=N"

      -> CCS gets "0xFFFC".

    2) C28388D(DSP)/SW updates a value from 0xFFFF_FFFC(=-4) -> 0x0000_00004(+4)

    3) CCS read 16-bit data with "Address=N+1"

      -> CCS gets "0x0004"

    4) Expressions widow shows a below value

        0x0000_FFFC(= - 65532)

    W/A  (A) :  You already provided a below option.

    W/A (B) : Continuous Refresh is OFF.

    Best regards,

    Hidehiko

  • Kaya-san,

    CCS Expressions window sometimes shows an invalid value (32-bit) when Continuous Refresh is enabled.

    Is it right ?

    That is correct. This is because the GEL memory map often specifies 16-bit accesses to memory so the debugger would need to do two 16-bit accesses to read the 32-bit value. Continuous refresh will sometimes refresh the Expressions view in the middle of this process so that only half of the 32-bit value was accessed, showing an invalid value.

    The workaround is to update the GEL memory map to specify 32-bit accesses as mentioned in the workaround for: https://sir.ext.ti.com/jira/browse/EXT_EP-10722

    "The C2000 GEL files could be changed to use AS4 to address this issue."

    W/A  (A) :  You already provided a below option.

    W/A (B) : Continuous Refresh is OFF.

    You don't need to do this if you change the GEL memory map.

    Thank you

    ki

  • Hi Ki-san,

    Thank you for your reply.

    >You don't need to do this if you change the GEL memory map.

    "The C2000 GEL files could be changed to use AS4 to address this issue."

    I will change the GEL memory map to fix this issue.

    Could you let me know how to change it ?

    1) Which GEL file is to change ?

    C:\ti\ccs1120\ccs\ccs_base\emulation\gel\

    f28388d_cpu1.gel

    My test board is TMDSCNCD28388D — F28388D evaluation module for C2000 MCU controlCARD

    CCS v11.2

    SW run on CPU1

    2) How to change ?

    A global variable is located on LS4

      GEL_MapAddStr(0x0000A000,0, 0x800, "R|W|AS2",0); /* LS4 RAM (with PARITY) (4KBytes) */

    ->

      GEL_MapAddStr(0x0000A000,0, 0x800, "R|W|AS4",0); /* LS4 RAM (with PARITY) (4KBytes) */

    And could you let us know what is disadvantage when AS4 is applied instead of  AS2 ?

     

    Best regards,

    Hidehiko

  • Kaya-san,

    1) Which GEL file is to change ?

    Check your target configuration file and see which GEL files are being used:

    https://software-dl.ti.com/ccs/esd/documents/users_guide/gel/targetconfig.html#adding-gel-files-to-a-target-configuration

    2) How to change ?

    A global variable is located on LS4

      GEL_MapAddStr(0x0000A000,0, 0x800, "R|W|AS2",0); /* LS4 RAM (with PARITY) (4KBytes) */

    ->

      GEL_MapAddStr(0x0000A000,0, 0x800, "R|W|AS4",0); /* LS4 RAM (with PARITY) (4KBytes) */

    Yes, this looks correct.

    And could you let us know what is disadvantage when AS4 is applied instead of  AS2 ?

    There is no disadvantage if 32-bit memory accesses are supported (which in this case it is).

    Thank you

    ki

  • Ki-san,

    Thank you for your answer.

    This problem is eliminated.

    I changed a below file. AS2 -> AS4 in data memory maps 

    C:\ti\ccs1120\ccs\ccs_base\emulation\gel\

    f28388d_cpu1.gel

    (My previous change is incorrect. It is for /* Program memory maps */)

    /* Data memory maps */

    ....

    GEL_MapAddStr(0x0000A000,1, 0x800, "R|W|AS4",0); /* LS4 RAM (with PARITY) (4KBytes) */

    >There is no disadvantage if 32-bit memory accesses are supported (which in this case it is).

    If so, I hope "AS4" will be default setting for this processor.

    Best regards,

    Hidehiko