# Atmel EDBG-based Tools Protocols
Protocol Commands

### Memory Write

Writes memory on the target.

Memories can only be accessed when the device is in STOPPED mode.

Table 121. Memory Write command format

Field | Size | Description
--- | --- | ---
CMD_AVR8_MEMORY_WRITE | 1 byte | Command ID
Version (0x00) | 1 byte | Command version
Type | 1 byte | Memory type to access. For overview of memory types see the section called “Memory Types”.
Address | 4 bytes | Start address [byte address] of memory to access.
Bytes | 4 bytes | Number of bytes to access. Payload restrictions apply
Asynchronous | 1 byte | 0x00 = write first, then reply 0x01 = reply first, then write
Data | n bytes | Payload restrictions apply

Note: Any error encountered during an asynchronous write will be reported on the following write.

Responses:

- OK

- FAILED

Prev | Up | Next
| Home |