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

Implementations§

Helper method to clear error bits raised

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.