pub enum Error {
DigitalSelfTestFailed(u8),
AnalogSelfTestFailed,
RepetitionCountTestFailed,
AdaptiveProportionTestFailed,
}Expand description
Variants§
DigitalSelfTestFailed(u8)
L-series TRM The digital startup health test is run by application software when powering up the TRNG module. This built-in self-test verifies that the digital block is functioning properly by running predefined sequences of digital samples through the complete digital block while checking for expected outputs. The test sequence includes eight tests (indexed 0-7.)
This failure indicates an irrecoverable fault in the digital block detected during startup.
AnalogSelfTestFailed
L-series TRM 13.2.4.2: The analog startup health test is run by application software when powering up the TRNG module. This test verifies that the analog block is functioning properly by capturing 4,096 consecutive analog samples and verifying that the samples pass a health test.
The driver only raises this error after three subsequent failures during initialization.
RepetitionCountTestFailed
L-series TRM 13.2.4.3.1: The repetition count test quickly detects failures that cause the entropy source to remain stuck on a single output value for an extended period of time. The repetition count test fails if the entropy source outputs the same bit value for 135 consecutive samples.
Trng::fail_reset. AdaptiveProportionTestFailed
L-series TRM 13.2.4.3.2: The adaptive proportion test detects failures that cause a disproportionate number of samples to be the same bit value and/or bit pattern over a window of 1024 samples. The adaptive proportion test fails if any of the conditions in Table 13-1 are violated.
Trng::fail_reset.