pub enum Error {
    Busy,
    Suspend,
    Overflow,
    Miss,
    Seq,
    Size,
    Align,
    Wp,
    Prog,
}
Expand description

Flash errors.

Variants§

§

Busy

Busy error.

A flash programming sequence was started while the previous sequence was still in-progress.

§

Suspend

Program erase suspend error.

A flash programming sequence was started with a program erase suspend bit set.

§

Overflow

Overflow error.

Returned by Flash::standard_program_generic, or Flash::program_bytes when the target data and address would exceed the end of flash memory.

§

Miss

Fast programming data miss error.

In Fast programming mode, 32 double-words (256 bytes) must be sent to the flash memory successively and the new data must be sent to the logic control before the current data is fully programmed.

This bit is set by hardware when the new data is not present in time.

§

Seq

Programming sequence error.

This bit is set by hardware when a write access to the flash memory is performed by the code, while PG or FSTPG have not been set previously.

This bit is also set by hardware when PROGERR, SIZERR, PGAERR, WRPERR, MISSERR or FASTERR is set due to a previous programming error.

§

Size

Size error.

This bit is set by hardware when the size of the access is a byte (u8) or half-word (u16) during a program or a fast program sequence. Only double-word (u64) programming is allowed (consequently: word (u32) access).

§

Align

Programming alignment error.

This bit is set by hardware when the data to program cannot be contained in the same double-word (u64) Flash memory in case of standard programming, or if there is a change of page during fast programming.

§

Wp

Write protection error.

An address to be erased/programmed belongs to a write-protected part (by WRP, PCROP or RDP level 1) of the flash memory.

§

Prog

Programming error.

A 64-bit address to be programmed contains a value different from 0xFFFF_FFFF_FFFF_FFFF before programming, except if the data to write is 0x0000_0000_0000_0000.

The erratum states that this will also occur when programming 0x0000_0000_0000_0000 to a location previously programmed with 0xFFFF_FFFF_FFFF_FFFF.

Trait Implementations§

source§

impl Clone for Error

source§

fn clone(&self) -> Error

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for Error

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Error

source§

fn eq(&self, other: &Error) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Error

source§

impl Eq for Error

source§

impl StructuralEq for Error

source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.