# Atmel EDBG-based Tools Protocols
Memory Types

### debugWIRE memtypes

Table 135. debugWIRE memtypes

ID | Prog Access | Debug Access | Usage / Rules
--- | --- | --- | ---

MEMTYPE_FLASH_PAGE

-

RW

- Used for writing FLASH before a debug session, and reading FLASH during a debug session.

- Only FULL PAGE access is allowed.

- If the number of bytes requested does not match the flash page size, an error is returned (AVR8_FAILURE_INVALID_SIZE).

- Software breakpoints are NOT filtered out.

MEMTYPE_SIGNATURE

-

R

- Used to read the device signature stored in the debugWIRE module itself.

- This signature may differ from the signature stored in FLASH and accessed through SPI programming interface.

- A read MUST be for exactly 3 bytes from address 0x00.

- Violating this will results in an error (AVR8_FAILURE_INVALID_SIZE / AVR8_FAILURE_INVALID_ADDRESS).

- Byte 2 will always read 0x1E.

MEMTYPE_SRAM

-

RW

- Accesses SRAM and IO space during debugging.

- If used in programming mode, an error is returned (AVR8_FAILURE_ILLEGAL_STATE)

- If a read attempts to read an area containing the OCDR register, an error is returned (AVR8_FAILURE_INVALID_ADDRESS).

- A masked read must be used in this case.

- Any number of bytes (within payload restrictions) can be written or read in one operation.

MEMTYPE_EEPROM

-

RW

- Used to read and write EEPROM during a debug session.

- Any number of bytes can be written or read in one operation.

- Uses monitor code heavily - may take some time to complete, depending proportionally upon the number of bytes being accessed.

MEMTYPE_SPM

-

R

- Used to access small amounts of FLASH during a debug session.

- If an odd number of bytes is requested, an error is returned [a].

- This memtype is efficient for reading full pages, or single words from FLASH.

- Multiple word requests are inefficient and may take time to complete.

- Software breakpoints are filtered out.

[a] AVR8_FAILURE_ILLEGAL_MEMORY_RANGE

Prev | Up | Next
| Home |