stm32 /stm32h7rs /STM32H7S /MCE1 /MCE_CC2CFGR

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

Interpret as MCE_CC2CFGR

31 2827 2423 2019 1615 1211 87 43 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (B_0x0)CCEN 0 (B_0x0)CCLOCK 0 (B_0x0)KEYLOCK 0KEYCRC0VERSION

CCEN=B_0x0, KEYLOCK=B_0x0, CCLOCK=B_0x0

Description

MCE cipher context 2 configuration register

Fields

CCEN

Cipher context enable

0 (B_0x0): If an enabled region selects CTXID=z bypass mode is selected by MCE

1 (B_0x1): If an enabled region selects CTXID=z with ENC=01 MCE selects with the stream cipher the information stored in MCE_CCzCFGR, MCE_CCzNR and MCE_CCzKEYR. If the enabled region selects ENC=10 or 11 instead MCE selects with the block cipher the key information stored in MCE_CCzKEYR.

CCLOCK

Cipher context lock Note: This bit is set once. If this bit is set, it can only be cleared to 0 if MCE is reset. Setting this bit forces KEYLOCK bit to 1.

0 (B_0x0): Writes to MCE_CCzCFGR and MCE_CCzNR registers are allowed

1 (B_0x1): Writes to MCE_CCzCFGR and MCE_CCzNR registers are ignored until next MCE reset.

KEYLOCK

Key lock Note: This bit is set once. If this bit is set, it can only be cleared to 0 if MCE is reset.

0 (B_0x0): Writes to MCE_CCzKEYR registers are allowed

1 (B_0x1): Writes to MCE_CCzKEYR registers are ignored until next MCE reset.

KEYCRC

Key CRC When KEYLOCK=0, KEYCRC information 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 KEYCRC computation starts as soon as a new valid sequence is initiated. KEYCRC bitfield reads as zero until a valid sequence is completed (after it return the computed CRC value). When GLOCK=1, KEYCRC bitfield always return the computed CRC value 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). Note: CRC information is updated, and the key is usable by MCE, only after the last bit of the key has been written. When GLOCK=0 any write to MCE_CCxKEYR registers clears KEYCRC in MCE_CCxCFGR, and makes the cipher context key un-usable (bypass mode is selected instead). To be able to use the key again application must perform this sequence: write to KEYR0 then KEYR1 then KEYR2 then finally KEYR3 (all written once). As KEYLOCK=1 all those writes are ignored, so the correct key is used instead.

VERSION

Version This 16-bit bitfield must be correctly initialized before CCEN bit is set. Bitfield usage is defined in Section 35.4.6: MCE stream cipher encryption mode.

Links

()