# Atmel EDBG-based Tools Protocols
Memory Types

### megaAVR (JTAG) OCD memtypes

Table 136. megaAVR (JTAG) OCD memtypes

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

MEMTYPE_FLASH_PAGE

RW

-

- Used for reading and writing FLASH pages in programming mode.

- Writing it restricted to single full FLASH pages.

- Reading is restricted to multiple full FLASH pages.

- If access is attempted outside of programming mode, an error is returned. [a]

MEMTYPE_EEPROM_PAGE

RW

-

- Used to read and write EEPROM in programming mode.

- Writing is restricted to single full pages.

- Reading is restricted to multiple full pages.

- If access is attempted outside of programming mode, an error is returned[a]

MEMTYPE_FUSES

RW

-

- Used to read and write FUSES in programming mode.

- Up to 3 fuses can be written/read in one operation. More than 3 results in an error [b]

- Up to address 0x02 can be accessed. Outside of this range results in an error [c]

- If access is attempted outside of programming mode, an error is returned[a]

MEMTYPE_LOCKBITS

RW

-

- Used to read and write LOCKBITS in programming mode.

- Only a single lockbit is available to read, at address 0.

- Violating this results in an error [b] [c]

- If access is attempted outside of programming mode, an error is returned[a]

MEMTYPE_SIGNATURE

R

-

- Used to read the device SIGNATURE in programming mode.

- Up to 3 signature bytes can be read in one operation. More than 3 results in an error[b]

- Up to address 0x02 can be accessed. Outside of this range results in an error[c]

- If access is attempted outside of programming mode, an error is returned[a]

MEMTYPE_OSCCAL

R

-

- Used to read the device OSCCAL VALUES in programming mode.

- Up to 4 bytes can be read in one operation. More than 4 results in an error[b]

- Up to address 0x03 can be accessed. Outside of this range results in an error[c]

- If access is attempted outside of programming mode, an error is returned[a]

MEMTYPE_SRAM

-

RW

- Accesses SRAM and IO space during debugging.

- If used in programming mode, an error is returned[a]

- If a read attempts to read an area containing the OCDR register, an error is returned[c].

- 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 read FLASH during a debug session.

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

- If a mal-aligned address is requested, an error is returned [e].

- Software breakpoints are filtered out.

MEMTYPE_USER_SIGNATURE

RW

RW

- Used to read/write the USER SIGNATURE in programming mode. NB: applies to ATmegaxxxRFR2 devices only!

- Writing it restricted to single full FLASH pages.

- Reading is restricted to multiple full FLASH pages.

[a] AVR8_FAILURE_ILLEGAL_STATE [b] AVR8_FAILURE_INVALID_SIZE [c] AVR8_FAILURE_INVALID_ADDRESS [d] AVR8_FAILURE_ILLEGAL_MEMORY_RANGE [e] AVR8_FAILURE_INVALID_ALIGNMENT

Prev | Up | Next
| Home |