Enum stm32l0x1_hal::flash::FlashError
source · pub enum FlashError {
Locked,
WriteProtect,
Alignment,
Size,
ReadProtection,
NotZero,
FetchAbort,
Unknown,
}
Expand description
Error states
Variants§
Locked
The data eeprom and FLASH_PECR register is locked
WriteProtect
Write protection error
This bit is set by hardware when an address to be programmed or erased is write-protected.
Alignment
Programming alignment error
This bit is set by hardware when an alignment error has happened: the first word of a half-page operation is not aligned to a half-page, or one of the following words in a half-page operation does not belong to the same half-page as the first word.
Size
Size error
This bit is set by hardware when the size of data to program is not correct.
ReadProtection
Read protection error
This bit is set by hardware when the user tries to read an area protected by PcROP.
NotZero
The write operation is attempting to write to a not-erased region
This bit is set by hardware when a program in the Flash program or System Memory tries to overwrite a not-zero area.
FetchAbort
A write/erase operation aborted to perform a fetch.
This bit is set by hardware when a write/erase operation is aborted to perform a fetch. This is not a real error, but it is used to inform that the write/erase operation did not execute.
Unknown
Some otherwise unknown error has happened or an unexpected status has arisen