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.

Non-intrusive emulator access to RAM

For motor control applications there is a need to access RAM variables with the inverter energized and the motor control application ISR running.  This access needs to be within CCS to allow tuning of the regulator variables from a Watch Window and for graphing variables.

C2000 has this today and calls it JTAG real-time mode.  A bit in the status register is set to enable this mode, so it is hardware based communication through JTAG.  The emulation logic is lower priority than the CPU so there is NO instrusiveness to the CPU program.  Real-life situation can be a DC bus voltage of 375V with PWMs switching and with a good board layout,  JTAG communication will provide updates to CCS on "real-time" variables.

Is real-time mode JTAG support with TMS570?  If not JTAG, then what alternative communication port is avaiable and what hardware and software tools support the alternative ports?

Thanks, Jeff

  • The TMS570 architecture supports JTAG access to RAM and peripherial registers though a minimaly invasive procedure using the DAP's (Debug Access Port) AHB interface.  The procedure to setup Code Composer Studio v4.x (CCS) to perform accesses using the TMS570 DAP is shown below. 

    Step 1: Setup the CCS Debug window to view non-processor devices (including the DAP).
    To do this, first launch the CCS debugger from the debug perspective.  Then choose 'Window -> Preferences' from the CCS File menu as shown in the picture below:

     

    Then in the Preferences window select 'CCS -> Debug' and enable the 'Show non-processor devices (i.e. routers like ICEPick and DAP)' check box as shown below.

     

     Then terminate and relaunch the debug session as shown in the following two pictures.

     

     

    Step 2: Setup the CCS Memory window to access the TMS570 RAM via the DAP.
    To do this, select the DAP from the Debug window and then launch a new Memory window as shown in the following two pictures.

    A new memory window can be launched by selecting 'View -> Memory' from the CCS File menu.

    Then from the newly launched memory window,  'pin' the memory window to the DAP as shown in the picture below.

    Step 3: Enable the Continuous Refresh mode of the Memory Window.
    To do this, select the 'Enable Continue Refresh' option in the Memory window as shown in the picture below.

     Now all changes made to the contents of the Memory Window (RAM, registers, etc...) will be made using the TMS570's DAP-AHB interface instead of using the CPU.  This will be minimally invasive to the Cortex R4 CPU. 
    NOTE:  If the resource (RAM, registers, etc...) being accessed via the DAP-AHB interface is not used by any other master (ARM CPU, DMA, etc..) there is no intrusion.  In other cases, minimally invasive arbitration will take place between the bus masters trying to access the resource.

    A similar procedure can be used to setup a CCS Watch Window to access the device's memory via the DAP. 

  • Adding to Anthony Vaughan's answer, it is much faster to use Watch Window to monitor or access memory ( typically Variables, registers, etc) using the TMS570's DAP-AHB interface. The only disadvantage is CCS4.x will not understand the symbols while DAP-AHB interface is used. Following are the steps to watch or edit contents of variables.

    In the below explanation, Variable_1 and Variable_2 are at address 0x08000804 and 0x08000808 respectively.

    Step 1: Setup the CCS Watch window to access the TMS570 RAM via the DAP.
    To do this, select the DAP from the Debug window and then launch a new watch window as shown in the following two pictures.

    A new memory window can be launched by selecting 'View -> Watch' from the CCS File menu.

    Then from the newly launched watch window,  give the Variable address(  in the watch window as shown in the picture below.
    Note: CCS4 does not recognizes the symbols (variable names) if the access is through DAP.

    Step 2: Monitoring ans Editing the Variable.

    -- To view the variable give *ADDRESS( for eg: *0x8000804), the watch window displays the value of the variable and updates with very minimal invasive procedure.
    -- To edit the contents select the Value Column in Watch window and edit it.

     

  • Anyone know how to do this in CCS 5.1?  Seems that everything works (more or less) except for the continuous refresh button.  You have to manually keep right clicking and hit refresh.  Sort of defeats the point . . .

    Thanks!

  • Hi Chris,

    The method should be the same in v5. If the continuous refresh button is not working, then that seems like a bug to me. I'll try to reproduce and file a bug.

    Thanks

    ki

  • Ki-Soo,

    This post shows how to display the memory in a memory window or in a watch window. Do you know how to force the "tools-> graph" to use the DAP to access a certain memroy location (e.g. 0x08001234)and continue refreshing?

    Thanks,

    Haixiao