Struct stm32_metapac::flash::regs::Nscr
#[repr(transparent)]pub struct Nscr(pub u32);
Expand description
FLASH non-secure control register
Tuple Fields§
§0: u32
Implementations§
§impl Nscr
impl Nscr
pub const fn mer1(&self) -> bool
pub const fn mer1(&self) -> bool
Non-secure bank 1 mass erase This bit triggers the bank 1 non-secure mass erase (all bank 1 user pages) when set.
pub fn set_mer1(&mut self, val: bool)
pub fn set_mer1(&mut self, val: bool)
Non-secure bank 1 mass erase This bit triggers the bank 1 non-secure mass erase (all bank 1 user pages) when set.
pub const fn pnb(&self) -> u8
pub const fn pnb(&self) -> u8
Non-secure page number selection These bits select the page to erase. …
pub fn set_pnb(&mut self, val: u8)
pub fn set_pnb(&mut self, val: u8)
Non-secure page number selection These bits select the page to erase. …
pub const fn bwr(&self) -> bool
pub const fn bwr(&self) -> bool
Non-secure burst write programming mode When set, this bit selects the burst write programming mode.
pub fn set_bwr(&mut self, val: bool)
pub fn set_bwr(&mut self, val: bool)
Non-secure burst write programming mode When set, this bit selects the burst write programming mode.
pub const fn mer2(&self) -> bool
pub const fn mer2(&self) -> bool
Non-secure bank 2 mass erase This bit triggers the bank 2 non-secure mass erase (all bank 2 user pages) when set.
pub fn set_mer2(&mut self, val: bool)
pub fn set_mer2(&mut self, val: bool)
Non-secure bank 2 mass erase This bit triggers the bank 2 non-secure mass erase (all bank 2 user pages) when set.
pub const fn strt(&self) -> bool
pub const fn strt(&self) -> bool
Non-secure start This bit triggers a non-secure erase operation when set. If MER1, MER2 and PER bits are reset and the STRT bit is set, the PGSERR bit in FLASH_NSSR is set (this condition is forbidden). This bit is set only by software and is cleared when the BSY bit is cleared in FLASH_NSSR.
pub fn set_strt(&mut self, val: bool)
pub fn set_strt(&mut self, val: bool)
Non-secure start This bit triggers a non-secure erase operation when set. If MER1, MER2 and PER bits are reset and the STRT bit is set, the PGSERR bit in FLASH_NSSR is set (this condition is forbidden). This bit is set only by software and is cleared when the BSY bit is cleared in FLASH_NSSR.
pub const fn optstrt(&self) -> bool
pub const fn optstrt(&self) -> bool
Options modification start This bit triggers an options operation when set. It can not be written if OPTLOCK bit is set. This bit is set only by software, and is cleared when the BSY bit is cleared in FLASH_NSSR.
pub fn set_optstrt(&mut self, val: bool)
pub fn set_optstrt(&mut self, val: bool)
Options modification start This bit triggers an options operation when set. It can not be written if OPTLOCK bit is set. This bit is set only by software, and is cleared when the BSY bit is cleared in FLASH_NSSR.
pub const fn eopie(&self) -> NscrEopie
pub const fn eopie(&self) -> NscrEopie
Non-secure end of operation interrupt enable This bit enables the interrupt generation when the EOP bit in the FLASH_NSSR is set to 1.
pub fn set_eopie(&mut self, val: NscrEopie)
pub fn set_eopie(&mut self, val: NscrEopie)
Non-secure end of operation interrupt enable This bit enables the interrupt generation when the EOP bit in the FLASH_NSSR is set to 1.
pub const fn errie(&self) -> NscrErrie
pub const fn errie(&self) -> NscrErrie
Non-secure error interrupt enable This bit enables the interrupt generation when the OPERR bit in the FLASH_NSSR is set to 1.
pub fn set_errie(&mut self, val: NscrErrie)
pub fn set_errie(&mut self, val: NscrErrie)
Non-secure error interrupt enable This bit enables the interrupt generation when the OPERR bit in the FLASH_NSSR is set to 1.
pub const fn obl_launch(&self) -> OblLaunch
pub const fn obl_launch(&self) -> OblLaunch
Force the option byte loading When set to 1, this bit forces the option byte reloading. This bit is cleared only when the option byte loading is complete. It cannot be written if OPTLOCK is set.
pub fn set_obl_launch(&mut self, val: OblLaunch)
pub fn set_obl_launch(&mut self, val: OblLaunch)
Force the option byte loading When set to 1, this bit forces the option byte reloading. This bit is cleared only when the option byte loading is complete. It cannot be written if OPTLOCK is set.
pub const fn optlock(&self) -> bool
pub const fn optlock(&self) -> bool
Option lock This bit is set only. When set, all bits concerning user options in FLASH_NSCR register are locked. This bit is cleared by hardware after detecting the unlock sequence. The LOCK bit in the FLASH_NSCR must be cleared before doing the unlock sequence for OPTLOCK bit. In case of an unsuccessful unlock operation, this bit remains set until the next reset.
pub fn set_optlock(&mut self, val: bool)
pub fn set_optlock(&mut self, val: bool)
Option lock This bit is set only. When set, all bits concerning user options in FLASH_NSCR register are locked. This bit is cleared by hardware after detecting the unlock sequence. The LOCK bit in the FLASH_NSCR must be cleared before doing the unlock sequence for OPTLOCK bit. In case of an unsuccessful unlock operation, this bit remains set until the next reset.
pub const fn lock(&self) -> bool
pub const fn lock(&self) -> bool
Non-secure lock This bit is set only. When set, the FLASH_NSCR register is locked. It is cleared by hardware after detecting the unlock sequence in FLASH_NSKEYR register. In case of an unsuccessful unlock operation, this bit remains set until the next system reset.
pub fn set_lock(&mut self, val: bool)
pub fn set_lock(&mut self, val: bool)
Non-secure lock This bit is set only. When set, the FLASH_NSCR register is locked. It is cleared by hardware after detecting the unlock sequence in FLASH_NSKEYR register. In case of an unsuccessful unlock operation, this bit remains set until the next system reset.
Trait Implementations§
impl Copy for Nscr
impl Eq for Nscr
impl StructuralPartialEq for Nscr
Auto Trait Implementations§
impl Freeze for Nscr
impl RefUnwindSafe for Nscr
impl Send for Nscr
impl Sync for Nscr
impl Unpin for Nscr
impl UnwindSafe for Nscr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)