Project - STM32F4 Discovery Board - Random Number Generator and supporting classes

STM32F4 Discovery Board - Random Number Generator and supporting classes

The STMicro STM32F4 Discovery board is cousin to the Cerb-family. It is capable of running the same .NETMF firmware. However, the Discovery board MCU has features that the Cerb-family of MCUs lack, one of these being a Hardware Random Number Generator.

The provided code has an implementation, using registers, of the STM32F407VGT6’s Random Number Generator. It is incomplete, but workable. Clock and other errors are not handled. In debug, the board can produce 1000 random numbers in about .5 seconds. This is found in the assembly GMD.STM32F4.RNG.

Also provided is the assembly GMD.STM32F4.Hardware. This contains static classes of constants and enums (mostly complete) for:
Peripheral Base Addresses
Peripheral Register structures
Hardware Pins (PA0 through PE15)
IRQs

Any suggestioins as to technique or format, or any thing else for that matter, are quite welcome, as are any contributions to complete or extend the code.

2 Likes

Very impressive!