Struct stm32_metapac::otfdec::regs::RegionCfgr
#[repr(transparent)]pub struct RegionCfgr(pub u32);
Expand description
OTFDEC region 3 configuration register.
Tuple Fields§
§0: u32
Implementations§
§impl RegionCfgr
impl RegionCfgr
pub const fn reg_en(&self) -> bool
pub const fn reg_en(&self) -> bool
region on-the-fly decryption enable Note: Garbage is decrypted if region context (version, key, nonce) is not valid when this bit is set.
pub fn set_reg_en(&mut self, val: bool)
pub fn set_reg_en(&mut self, val: bool)
region on-the-fly decryption enable Note: Garbage is decrypted if region context (version, key, nonce) is not valid when this bit is set.
pub const fn configlock(&self) -> bool
pub const fn configlock(&self) -> bool
region config lock Note: This bit is set once. If this bit is set, it can only be reset to 0 if OTFDEC is reset. Setting this bit forces KEYLOCK bit to 1.
pub fn set_configlock(&mut self, val: bool)
pub fn set_configlock(&mut self, val: bool)
region config lock Note: This bit is set once. If this bit is set, it can only be reset to 0 if OTFDEC is reset. Setting this bit forces KEYLOCK bit to 1.
pub const fn keylock(&self) -> bool
pub const fn keylock(&self) -> bool
region key lock Note: This bit is set once: if this bit is set, it can only be reset to 0 if the OTFDEC is reset.
pub fn set_keylock(&mut self, val: bool)
pub fn set_keylock(&mut self, val: bool)
region key lock Note: This bit is set once: if this bit is set, it can only be reset to 0 if the OTFDEC is reset.
pub const fn mode(&self) -> Mode
pub const fn mode(&self) -> Mode
operating mode This bitfield selects the OTFDEC operating mode for this region: Others: Reserved When MODE ≠ 11, the standard AES encryption mode is activated. When either of the MODE bits are changed, the region key and associated CRC are zeroed.
pub fn set_mode(&mut self, val: Mode)
pub fn set_mode(&mut self, val: Mode)
operating mode This bitfield selects the OTFDEC operating mode for this region: Others: Reserved When MODE ≠ 11, the standard AES encryption mode is activated. When either of the MODE bits are changed, the region key and associated CRC are zeroed.
pub const fn keycrc(&self) -> u8
pub const fn keycrc(&self) -> u8
region key 8-bit CRC When KEYLOCK = 0, KEYCRC bitfield is automatically computed by hardware while loading the key of this region in this exact sequence: KEYR0 then KEYR1 then KEYR2 then finally KEYR3 (all written once). A new computation starts as soon as a new valid sequence is initiated, and KEYCRC is read as zero until a valid sequence is completed. When KEYLOCK = 1, KEYCRC remains unchanged until the next reset. CRC computation is an 8-bit checksum using the standard CRC-8-CCITT algorithm X8 + X2 + X + 1 (according the convention). Source code is available in . This field is read only. Note: CRC information is updated only after the last bit of the key has been written.
pub fn set_keycrc(&mut self, val: u8)
pub fn set_keycrc(&mut self, val: u8)
region key 8-bit CRC When KEYLOCK = 0, KEYCRC bitfield is automatically computed by hardware while loading the key of this region in this exact sequence: KEYR0 then KEYR1 then KEYR2 then finally KEYR3 (all written once). A new computation starts as soon as a new valid sequence is initiated, and KEYCRC is read as zero until a valid sequence is completed. When KEYLOCK = 1, KEYCRC remains unchanged until the next reset. CRC computation is an 8-bit checksum using the standard CRC-8-CCITT algorithm X8 + X2 + X + 1 (according the convention). Source code is available in . This field is read only. Note: CRC information is updated only after the last bit of the key has been written.
pub const fn reg_version(&self) -> u16
pub const fn reg_version(&self) -> u16
region firmware version This 16-bit bitfield must be correctly initialized before the region corresponding REG_EN bit is set in OTFDEC_RxCFGR.
pub fn set_reg_version(&mut self, val: u16)
pub fn set_reg_version(&mut self, val: u16)
region firmware version This 16-bit bitfield must be correctly initialized before the region corresponding REG_EN bit is set in OTFDEC_RxCFGR.
Trait Implementations§
§impl Clone for RegionCfgr
impl Clone for RegionCfgr
§fn clone(&self) -> RegionCfgr
fn clone(&self) -> RegionCfgr
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Default for RegionCfgr
impl Default for RegionCfgr
§fn default() -> RegionCfgr
fn default() -> RegionCfgr
§impl PartialEq for RegionCfgr
impl PartialEq for RegionCfgr
§fn eq(&self, other: &RegionCfgr) -> bool
fn eq(&self, other: &RegionCfgr) -> bool
self
and other
values to be equal, and is used
by ==
.