5.3 Access Primitives

Based on MEM-AP access, the host (debugger PC utility) can rely on the following primitives:

Refer to ARM IHI 0031 for MEM-AP related sequence of transactions to read or write the memory.

Table 5-1. Access Primitives
Memory Access PrimitiveDescription
Status ReadD8(U32 Addr, Value)Read a byte (8 bits) from device memory at address Addr

Returns OK, FAULT, WAIT or ERROR

Status ReadD16(U32 Addr,Value)Read half-word (16 bits) from device memory at address Addr

Returns OK, FAULT, WAIT or ERROR

Status ReadD32(U32 Addr,Value)Read a word (32 bits) from device memory at address Addr

Returns OK, FAULT, WAIT or ERROR

Status WriteD8(U32 Addr,Value)Write a byte (8 bits) to device memory at address Addr

Returns OK, FAULT, WAIT or ERROR

Status WriteD16(U32 Addr,Value)Write half-word (16 bits) to device memory at address Addr

Returns OK, FAULT, WAIT or ERROR

Status WriteD32(U32 Addr,Value)Write a word (32 bits) to device memory at address Addr

Returns OK, FAULT, WAIT or ERROR

Note: The user can use the speed-optimized primitives for block access using the auto-increment feature of the MEM-AP, but they are not mandatory to support all the device features. Refer ARM IHI 0031.

The rest of the document relies on this MEM-AP layer and the above-defined primitives to describe the interaction between the device and debugger.