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.

TMS320F28384D: JTAG debugger memory access issue

Expert 1700 points

Part Number: TMS320F28384D
Other Parts Discussed in Thread: TMS320F28388D

Hello team,

 

When I am using the JTAG debugger, the firmware is not able to write to GS2 RAM block. The firmware can write to other RAM blocks. If I suspend the JTAG debugger and manually write, then the write operation succeeds. It is the same when I am working with an evaluation board (TMS320F28388D device and XDS100v2 USB Debug Probe) and with our target (TMS320F28384D device and XDS100v3 USB Debug Probe). However, when I am working without JTAG debugger on our target I don't face this issue, and the firmware writes successfully to GS2 RAM block.

What is the cause for this issue, and how can I fix it?

Is there a kind of JTAG debugger configuration that blocks writing to memory range?

 

Thank you in advance,  

Inno.

  • Hi Inno,

    Is this issue with CPU1 or CPU2 ? Also with JTAG Debugger connected, can you check the value in GSxMSEL register using CCS register view ? 

    Regards,

    Vivek Singh

  • Hi Vivek,

    Sorry that I forgot to mention. This issue is with CPU1.

    Checked with JTAG Debugger connected, using CCS register view, all bits of GSxMSEL register are 0. Actually, the value of all MemCfgRegs registers is 0.

    By the way, please note that GSxMSEL does not appear in table 3-245 (MEM_CFG_REGS Registers) on section 3.14.11 (page 450) of the Technical Reference Manual (SPRUII0C). Also the description of GSxMSEL register does not exist on the sections following that table.

    Regards,

    Inno.

  • HI,

    Are you seeing this issue on multiple boards ? Also are you able to read correctly from GS2 RAM  ? 

    Also can you check the value at address location 0x5D070 ?

    By the way, please note that GSxMSEL does not appear in table 3-245 (MEM_CFG_REGS Registers) on section 3.14.11 (page 450) of the Technical Reference Manual (SPRUII0C). Also the description of GSxMSEL register does not exist on the sections following that table.

    Yes, we are aware of this issue and it'll be fixed in next document release.

    Regards,

    Vivek Singh

  • Hi,

    We see this issue on multiple boards. It is the same when working with an evaluation board (TMS320F28388D device and XDS100v2 USB Debug Probe) and with our target (TMS320F28384D device and XDS100v3 USB Debug Probe).

    I am able to read correctly from GS2 RAM. Furthermore, if I suspend the debugger, I am able to manually write to GS2 RAM via the Memory Browser view in CCS.

    I am not sure, but it seems that CCS uses GS2 RAM for firmware download, and the last firmware download data in GS2 RAM remains also when my application runs.

    The value at address location 0x5D070 is 0 (read from both CPU1 and CPU2).

    Regards,

    Inno.

  • Hi,

    The value at address location 0x5D070 is 0 (read from both CPU1 and CPU2).

    This value does not look correct. Can you please double check this ? Also can you read this location value from application when there is no issue ?

    Regards,

    Vivek Singh

  • Hi,

    Evaluation board (TMS320F28388D device and XDS100v2 USB Debug Probe):

    Issue exists.

    Snapshot of CCS Memory Browser view of CPU 1:

    Our target (TMS320F28384D device and XDS100v3 USB Debug Probe):

    Issue does not exists.

    Snapshot of CCS Memory Browser view of CPU 1:

    Our target without Debug Probe:

    Issue does not exists.

    I can't provide CCS memory snapshot because the debug probe is not connected.

    When my application reads memory location 0x5D070 using "*(int *)0x5D070" it reads 0.

    Regards,

    Inno.

  • Sorry, I was providing you the x8 (byte) address instead of x16. Can you check address 0x5D038.

    Our target (TMS320F28384D device and XDS100v3 USB Debug Probe):

    Issue does not exists.

    Snapshot of CCS Memory Browser view of CPU 1:

    It says, issue does not exist with your target. Is that correct ?

    I am not sure, but it seems that CCS uses GS2 RAM for firmware download, and the last firmware download data in GS2 RAM remains also when my application runs.

    Yes, debugger does use GSx RAM for code download but if you are not invoking debugger to load the code, it should not matter. May be you can list the step you are following when you see this issue.

    Regards,

    Vivek Singh

  • Hi,

    Evaluation board (TMS320F28388D device and XDS100v2 USB Debug Probe):

    Issue exists.

    The value at address 0x5D038 is 0xFFFF.

    Snapshot of CCS Memory Browser view of CPU 1:

    Our target (TMS320F28384D device and XDS100v3 USB Debug Probe):

    Issue exists. Last post (yesterday) I reported that the issue does not exist for this configuration. Maybe yesterday I did something in different order, but I can't think of such. I am sorry that yesterday I didn't repeat this test few more times to see if the "issue does not exist" is consistent.

    The value at address 0x5D038 is 0xFFFF.

    Snapshot of CCS Memory Browser view of CPU 1:

    Our target without Debug Probe:

    Issue does not exists.

    When my application reads memory location 0x5D038 using "*(int *)0x5D038" it reads 0xFFFF.

      Here is the steps I am following when I see this issue:

    - Build the project in CCS (CPU1 and CPU2).

    - Connect to target and load program to flash, CPU1 then CPU2.

    - Run both CPUs (CPU1 first).

    - Instruct my application to collect data and write it to RAM.

    - Send this data over SCI to a PC and analyze it (print a graph).

    - The part stored in GS2 RAM is fixed and is not the data stored by the application. The part stored in GS3 RAM is Ok.

    Regards,

    Inno.

  • After programming the CPU2 you need to issue a reset. Can you try below steps -

    - Build the project in CCS (CPU1 and CPU2).

    - Connect to target and load program to flash, CPU1 then CPU2.

    - Reset CPU1 and restart (CCS icon) CPU1 and then reset CPU2 and restart CPU2

    - Run both CPUs (CPU1 first).

    - Instruct my application to collect data and write it to RAM.

    - Send this data over SCI to a PC and analyze it (print a graph).

    - The part stored in GS2 RAM is fixed and is not the data stored by the application. The part stored in GS3 RAM is Ok.

    Let me know if this helps.

    Regards,

    Vivek Singh

  • Hi,

    Great. Now it works without the issue.

    I tried 2 times your solution on the evaluation board and 2 times on our target with the debugger. The issue does not exist.

    I tried one time without you solution on our target with the debugger. The issue exists.

    Thank you very much for your support.

    Regards,

    Inno.