# DAP_TI_TransferBlock

CMSIS-DAP: DAP_TI_TransferBlock

| CMSIS-DAP Version 1.2.0 (Proposal) Interface Firmware for CoreSight Debug Access Port

- Main Page
- Usage and Description
- Reference

All Functions Groups Pages
DAP_TI_TransferBlock
Test Input Commands

Transfer the data that are recorded for various Test Input channels. More...

Transfer the data that are recorded for various Test Input channels.

The DAP_TI_TransferBlock Command initiates the data transfer of a single trace data block of the recorded trace data. The command delivers the content of one trace data block in the Trace Data Management system.

DAP_TI_TransferBlock Request:

| BYTE | BYTE *******|
> 0x20 | DataRequest |
|******|*************|

- DataRequest: specifies the requested data from the Trace Data Management system.
  - bit 0: 1 = deliver one trace data block from any full trace data block (this includes SWO).
  - bit 1: 1 = deliver one trace data block from SWO channel (even when partially filled).
  - bit 2: 1 = deliver one trace data block from any partially filled trace data block (this includes SWO).

DAP_TI_TransferBlock Response:

| BYTE | BYTE ***| SHORT ****| WORD ********|+++++++++++++|
< 0x20 | Channel | DataParms | TD_TimeStamp | ChannelData |
|******|*********|///////////|//////////////|+++++++++++++|

- Channel:
  - bit 0..3: number of the channel that the data belong to.
  - bit 4: SWO record indicator: 1 = data belong to SWO data recording.
  - bit 6: First record indicator: 1 = DataParms and TimeStamp is transferred. 0 = Only ChannelData.
  - bit 7: No data indicator: 1 = No ChannelData available for this request. 0 = ChannelData are available.
- DataParms: parameters for ChannelData.
  - bit 0..12: number of data values in ChannelData. DAP_TI_TransferBlock Response is repeated until all values are transmitted.
  - bit 14: 1 = difference value format. 0 = contiguous value format.
  - bit 15: 1 = Trace Data Management overflow since last DAP_TI_TransferBlock Request. 0 = no overflow.
- TD_TimeStamp: Test Domain Timer value at the read time of data values for ChannelData.
- ChannelData: data values from the recorded Test Input channel.

The ChannelData reply has depending on DataParms bit 14 two different formats. If ChannelDiff in DAP_TI_Capture Request is set for the specific channel, the Debug Unit may decide the data format depending on the trace data values.

Contiguous Value Format transmits sequentially all data values stored in the trace data buffer. When DataParms bit 14 = 0 the ChannelData has the following format:

|************|************|************|......
| TraceValue | TraceValue | TraceValue |
|************|************|************|......

The size of TraceValue depends on the data size for the channel (see DAP_TI_Info Response, Attributes bit 0..2). DAP_TI_TransferBlock Response is repeated until the number of TraceValues specified by DataParms bit 0 .. 12 is transmitted.

Difference Value Format transmits data values only when there is a significant difference. When DataParms bit 14 = 1 the ChannelData has the following format:

|*************| SHORT *****|*************|......
| TraceValue0 | ValueIndex | TraceValueI |
|*************|////////////|/////////////|......

- TraceValue0: is the first data value on the trace data buffer
- ValueIndex: information about the next data value in TraceValueI.
  - bit 0..12: index in trace data buffer of next data value with significant difference.
  - bit 15: 1 = last trace value of trace data buffer send by DAP_TI_TransferBlock Response.
- TraceValueI: is the trace data value in in trace data buffer referenced by index.

The size of TraceValue0 and TraceValueI depends on the data size for the channel (see DAP_TI_Info Response, Attributes bit 0..2). DAP_TI_TransferBlock Response is repeated until ValueIndex with bit 15 = 1 is transmitted.

Note
  When all data values in the trace buffer are identical, ValueIndex is set to number of data values with bit 15 set to 1.