 Hello and welcome to this presentation of the STM32 Random Number Generator. The features of this peripheral, which is widely used to provide random numbers, will be covered in this presentation. The Random Number Generator or RNG integrated inside STM32 products provides random numbers which are used when predicting an unpredictable result is desirable. Applications can benefit from the RNG to increase the randomness of numbers or to decrease the possibility of guessing certain values. The RNG peripheral is based on continuous analog noise that provides a random 32-bit value which will be explained in detail later on. The RNG is able to generate a 32-bit random number at an average frequency of AHB per 54. A flag is set in the data register when new random data is ready and validated. The RNG verifies the randomness of the provided data. If more than 64 consecutive bits have the same value, zero or one, or there are more than 32 consecutive alternating zeros and ones, a seed error current status flag is set. When a PLL48 RNG clock source is used, a clock error current status flag is set if the PLL48 clock frequency is less than HCLK divided by 32. An interrupt source can also be enabled to indicate an abnormal seed sequence or frequency error. This simplified block diagram of the RNG shows its basic functional and control modules. The Random Number Generator is based on an analog circuit of several ring oscillators whose outputs are XOR'd to generate the seeds that feed a linear feedback shift register in order to produce 32-bit random numbers. The linear feedback shift register is clocked by a dedicated RNG clock signal so that the quality of the random number is independent of the HCLK frequency. The contents of the linear feedback shift register are transferred into the data register when a significant number of seeds have been introduced into the LFS register. In parallel, an error management block verifies the correct seed behavior and the frequency of the RNG source clock if a PLL48 source is used. Status bits are set and an interrupt is triggered if an abnormal sequence is detected in the seed or if the frequency of the PLL48 RNG clock is too low. The RNG can be used for a wide range of applications, including cryptography, games, and statistical sampling. For example, all the security of cryptography algorithms are connected to the impossibility of guessing the key. So the key has to be a random number, otherwise the attacker can guess it. This is a list of peripherals related to the Random Number Generator. Please refer to these peripheral trainings for more information if needed. For more details, please refer to application note AN4232 about using the NIST Statistical Test Suite to validate the random numbers generated by STM32MCUs.