Debug Access Port - DAP

From Texas Instruments Wiki
(Redirected from Debug Access Port (DAP))
Jump to: navigation, search

The debug access port (DAP) is part of the ARM emulation logic and enables an external debugger to directly access the entire memory space of the device without requiring the processor to enter the debug state and be programmed with a load or store instruction. The DAP is particularly useful for accessing registers when the processor is transitioning in and out of low-power states where it is not possible to force the processor into the debug state. Please note that not all TI devices include a DAP controller so please consult the device documentation to see if the device has a DAP controller. This article describes how the DAP can be used on an OMAP3 device to read/write registers without placing the processor into the debug state using CCStudio.


OMAP3 Emulation Sub-system

The following block diagram shows the emulation circuitry in the OMAP3 device. The ICEPICK is the first device in the JTAG scan chain and through the ICEPICK other devices such as the IVA2 (DSP Sub-system), MPU (ARM Sub-system) and DAP can be accessed. The ICEPICK controller allows devices to be dynamically switched in and out of the JTAG scan chain, such that if one device is power-down, you may access the other devices in the scan chain. Without the ICEPICK this was not possible as powering-off one device broke the JTAG scan chain for all devices.

Omap3-emu.JPG


Using the DAP to access registers on the OMAP3 Beagle Board with CCStudio v3.3

For this example CCStudio v3.3 with Service Release 12 (SR12) and Blackhawk JTAG debugger USB560m with Blackhawk driver release 3.3.300.2 were used.


Configure CCStudio for OMAP3530 Beagle Board and Blackhawk XDS560m

  • Start CCStudio Setup
  • From the drop-down menus under "Family" select "OMAP" and under "Platform" select "bh-usb560(m)" (see below).
  • Under "Available Factory Boards" find the "Blackhawk USB560m - OMAP3530 Beagle Board" configuration and click the "<< Add" button.
  • Finally click "Save & Quit" and click "Yes" when asked if you want to start CCS.

Ccs3.3-setup-omap3beagle.JPG


Connect to ICEPICK and DAP

  • In the CCS Parallel Debug Manager (see below) right click on the ICEPICK (ICEPICK_C_0) device and select "Connect Device".
  • In the CCS Parallel Debug Manager (see below) right click on the DAP (CS_DAP_PC_0) device and select "Connect Device".
  • When connected to the ICEPICK and DAP, left clicking on the "Blackhawk USB560m - OMAP3530 Beagle Board" platform will show power, clock and reset status of all the devices in the system.

Ccs3.3-pdm-omap3beagle.JPG


Access registers via DAP

  • In the CCS Parallel Debug Manager, right click on the CorexA8 (CortexA_0) and select "Open". A debug window for the Cortex-A8 should now appear. Please note that the state in the bottom left corner should show the Cortex-A8 as "DISCONNECTED (UNKNOWN)" (see below).
  • Open a Memory Window by going to the "View" menu and selecting "Memory".
  • At the top of the Memory window that appears you should see two drop-down menus, one titled "Enter An Address" and the other "Blackhawk USB560m - OMAP3530 Beagle Board/CortexA_0". Select the drop-down menu titled "Blackhawk USB560m - OMAP3530 Beagle Board/CortexA_0" and change to ""Blackhawk USB560m - OMAP3530 Beagle Board/CS_DAP_PC_0". This configures CCS to access the registers via the DAP controller instead of the Cortex-A8.
  • Finally, enter an address that you want to view in the "Enter An Address" drop-down menu. Please note that if register locations are in a power domain or sub-system that is not powered or clocked, then the registers will not be viewable. For test purposes you may try the registers in the PRCM module as some of these registers are in the wake-up domain and hence are always powered. For example try viewing the MPU Power Status (PM_PWSTST_MPU) register at address 0x483069E4.

Ccs3.3-dap-omap3beagle.JPG


Using the DAP to access registers on the OMAP3 Beagle Board with CCStudio v4.0

For this example CCStudio v4.0.1.01001 and Blackhawk JTAG debugger USB560m with Blackhawk driver release 1.09.03.23 were used.


Configure CCStudio for OMAP3530 Beagle Board and Blackhawk XDS560m

  • Start CCStudio v4.0
  • Go to the "File" menu and select "New --> Target Configuration File".
  • Give the target configuration a name, for example, "omap3beagleboardbh560m".
  • Under the "Basic" tab of the configuration windows that opens, for "Connection" select "Blackhawk USB560-M Emulator" and for "Device" select "OMAP3530".
  • Save click "Save" button under "Save Configuration".

Ccs4-setup-omap3beagle.JPG


Connect to ICEPICK and DAP

  • By default devices such as ICEPICK and DAP are hidden in CCS v4.0. To be able to view and connect to these devices, you need to make them visible in CCS. To do so see this article.
  • Start the debugger by going to the "Target" menu and selecting "Launch TI Debugger".
  • In the "Debug" window right click on the "Blackhawk USB-560-M Emulator_0/IcePick_C_0" and select "Connect Target".
  • In the "Debug" window right click on the "Blackhawk USB-560-M Emulator_0/CS_DAP_PC_0" and select "Connect Target".

Ccs4-debug-omap3beagle.JPG


Access registers via DAP

  • Open a Memory Window by going to the "View" menu and selecting "Memory".
  • Select the DAP by clicking on the icon labeled "Device" under "Blackhawk USB-560-M Emulator_0/CS_DAP_PC_0" in the "Debug" window (see below).
  • Enter an address that you want to view in the memory window. Please note that if register locations are in a power domain or sub-system that is not powered or clocked, then the registers will not be viewable. For test purposes you may try the registers in the PRCM module as some of these registers are in the wake-up domain and hence are always powered. For example try viewing the MPU Power Status (PM_PWSTST_MPU) register at address 0x483069E4.

Ccs4-dap-omap3beagle.JPG


Using the DAP to access registers on the OMAP3 Beagle Board with Lauterbach Trace32 ICD

For this example Lauterbach Trace32 ICD build 20826 (Dec 8th 2009) and Lauterbach Power Debug were used.


Configure Trace32 for OMAP3530 Beagle Board

  • Start Trace32 for ARM
  • In the Trace32 command window enter the following commands:
SYStem.RESet
SYStem.CPU OMAP3530


Connect to ICEPICK and DAP

  • In the Trace32 command window execute the following command to connect to the DAP:
SYStem.Mode PREPARE


Access registers via DAP

  • In the Trace32 command window execute the following command to dump memory contents:
d ahb:<address>
  • Please note that if register locations are in a power domain or sub-system that is not powered or clocked, then the registers will not be viewable. For test purposes you may try the registers in the PRCM module as some of these registers are in the wake-up domain and hence are always powered. For example try viewing the MPU Power Status (PM_PWSTST_MPU) register at address 0x483069E4.

Trace32-dap.png