6.1.15 Erase Section

Erases a contiguous flash section.

The Erase Section command will first unlock all regions which are within the requested flash range to erase. If the requested flash area (start address; pages) constitutes the entire flash of the device, the Erase All command will be used. Otherwise a sequence of page erases will be performed.

Note: Erasing sections can also be done by writing to the flash controller directly.
Table 6-18. Erase Section Command Format
FieldSizeDescription
AVR32_CMD_ERASE_SECTION1 byteCommand ID
Version (0x00)1 byteCommand version
Unlock1 byteBoolean flag indicating whether to unlock flash regions before erase
Memory type1 byteMemory type to access; see Memory Types
Start address4 bytesStart address of flash section to erase
Pages2 bytesNumber of pages to erase

Responses: