mem_ap_setup_transfer() function
Queue transactions setting up transfer parameters for the currently selected MEM-AP. Subsequent transfers using registers like MEM_AP_REG_DRW or MEM_AP_REG_BD2 initiate data reads or writes using memory or peripheral addresses. If the CSW is configured for it, the TAR may be automatically incremented after each transfer.
Arguments
csw
MEM-AP Control/Status Word (CSW) register to assign. If this matches the cached value, the register is not changed.
tar
MEM-AP Transfer Address Register (TAR) to assign. If this matches the cached address, the register is not changed.
Return value
ERROR_OK if the transaction was properly queued, else a fault code.