Erases a contiguous flash section
The Page Erase 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 86. Erase section command format
Field | Size | Description |
---|---|---|
AVR32_CMD_ERASE_SECTION | 1 byte | Command ID |
Version (0x00) | 1 byte | Command version |
Unlock | 1 byte | Boolean flag indicating whether to unlock flash regions before erase |
Memory type | 1 byte | Memory type to access; see the section called “Memory Types” |
Start address | 4 bytes | Start address of flash section to erase |
Pages | 2 bytes | Number of pages to erase |
Responses:
OK
FAILED