A.8.25 CADI::CADIMemWrite()

This function writes values to the memory in the target.

virtual CADIReturn_t CADI::CADIMemWrite(CADIAddrComplete_t startAddress,
                                       uint32_t unitsToWrite,
                                       uint32_t unitSizeInBytes,
                                       const uint8_t *data,
                                       uint32_t *actualNumOfUnitsWritten,
                                       uint8_t doSideEffects) = 0;
is the start address to begin writing from. If startAddress.overlay is CADI_NO_OVERLAY, it refers to the current overlay.
is the number of units of size unitSizeInBytes to write.
is the unit size, specified in bytes, of the memory accesses.
is the data buffer holding the values to be written. This buffer contains target data that will be interpreted according the endianness that is declared in the memory space that is used for the access.
is the number of units actually written to the target. It can be less than the number of units requested.

If set to true, this parameter informs the target that it must perform side effects on a write access. Such a side effect might be, for example, triggering an interrupt.

If set to false, the target must decide when to ignore this parameter. In some cases it is not possible to write to memory without doing a side effect, such as manipulating a memory-mapped register that influences a hardware accelerator's behavior and changes the computed results.


  • On error, CADIMemWrite() must return the error position in actualNumOfUnits*. Data is assumed to be valid up to this position.
  • If the write spans a gap in the memory space, the target must stop writing at the beginning of the gap and return the number of successful writes in numUnitsWritten.
Non-ConfidentialPDF file icon PDF version100963_0200_03_en
Copyright © 2014–2018 Arm Limited or its affiliates. All rights reserved.