TRNG driver modules.
More...
TRNG driver modules.
◆ TRNG_ClearFlag()
void TRNG_ClearFlag |
( |
uint8_t |
TRNG_FLAG | ) |
|
Clears the TRNG's pending flags.
- Parameters
-
TRNG_FLAG | specifies the flags to clear. This parameter can be any combination of the following values:
- TRNG_FLAG_SECS: Seed error current status flag
- TRNG_FLAG_CECS: Clock error current status flag
|
- Note
- Data ready bit(DRDY) in SR register only can be read but written, so you can not clear the TRNG_FLAG_DRDY.
- Returns
- None
◆ TRNG_ClearITPendingBit()
void TRNG_ClearITPendingBit |
( |
uint16_t |
TRNG_IT | ) |
|
Clears the TRNG's pending interrupt pending bits.
- Parameters
-
TRNG_IT | specifies the interrupt pending bit to clear. This parameter can be any combination of the following values:
- TRNG_IT_SEIS: Seed error interrupt
- TRNG_IT_CEIS: Clock error interrupt
|
- Note
- Data ready bit(DRDY) in SR register only can be read but writen, so you can not clear TRNG_IT_DRDY.
- Returns
- None
◆ TRNG_Clock_CheckCmd()
void TRNG_Clock_CheckCmd |
( |
FunctionalState |
NewState | ) |
|
Enables or disables the TRNG clock error detection.
- Parameters
-
NewState | new state of the TRNG clock error detection. This parameter can be: ENABLE or DISABLE. |
- Note
- When enables the clock error detection, TRNG peripheral should be disabled, and then TRNG peripheral can not generate true random number.
- Returns
- None.
◆ TRNG_Cmd()
void TRNG_Cmd |
( |
FunctionalState |
NewState | ) |
|
Enables or disables the TRNG peripheral generate true random number.
- Parameters
-
NewState | new state of the TRNG. This parameter can be: ENABLE or DISABLE. |
- Note
- When enables the TRNG peripheral, clock error detection should be disabled.
- Returns
- None
◆ TRNG_DeInit()
void TRNG_DeInit |
( |
void |
| ) |
|
Deinitializes the TRNG peripheral registers to their default reset values.
- Parameters
-
- Returns
- None
◆ TRNG_GetData()
uint32_t TRNG_GetData |
( |
void |
| ) |
|
Returns true random number value.
- Parameters
-
- Returns
- 32-bit TRNG
◆ TRNG_GetFlagStatus()
FlagStatus TRNG_GetFlagStatus |
( |
uint8_t |
TRNG_FLAG | ) |
|
Checks whether the specified TRNG flag is set or not.
- Parameters
-
TRNG_FLAG | specifies the flag to check. This parameter can be one of the following values:
- TRNG_FLAG_SECS: Seed error current status flag
- TRNG_FLAG_CECS: Clock error current status flag
- TRNG_FLAG_DRDY: TRNG data ready flag
|
- Returns
- The new state of TRNG_FLAG (SET or RESET).
◆ TRNG_GetITStatus()
ITStatus TRNG_GetITStatus |
( |
uint16_t |
TRNG_IT | ) |
|
Checks whether the specified TRNG interrupt has occurred or not.
- Parameters
-
TRNG_IT | specifies the interrupt source to check. This parameter can be one of the following values:
- TRNG_IT_SEIS: Seed error interrupt
- TRNG_IT_CEIS: Clock error interrupt
- TRNG_IT_DRDY: TRNG data ready interrupt
|
- Returns
- The new state of TRNG_IT (SET or RESET).
◆ TRNG_ITCmd()
void TRNG_ITCmd |
( |
FunctionalState |
NewState | ) |
|
Enable or Disable the TRNG interrupt.
- Parameters
-
NewState | new state of the TRNG interrupt. This parameter can be: ENABLE or DISABLE. |
- Returns
- None