Enum stm32wlxx_hal::flash::Error
source · 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
.