Skip to content

A STM32F4 based hardware random number generator.

Notifications You must be signed in to change notification settings

wangyeee/stm32_rand

Repository files navigation

STM32 Random Number Generator

This project turns STM32F4-Discovery board, or any STM32F4 board with USB port into a hardware random number generator.

Prerequisite

  1. GNU Arm Embedded Toolchain
  2. STM32CubeMX
  3. Firmware programming tool

Compiling the Code

  1. Clone this project, open stm32_rand.ioc with STM32CubeMX. The click Generate Code under Project menu to download and copy STM32F4 drivers and USB libraries to Drivers/CMSIS, Drivers/STM32F4xx_HAL_Driver and Middlewares/ST/STM32_USB_Device_Library.
  2. Type make to build, or make DEBUG=0 OPT=-O2 to build a release version.

Programing and Running

  1. Programme the binary to board. With the onboard ST-Link, varity of tools can be employed to programme the flash memory. Such as ST-LINK utility on Windows, or stlink from texane which works on both Linux and macOS.
  2. Connect the micro USB port to PC, a new serial port will be available.
  3. Random numbers can be accessed by simply reading data from the new serial port. A python script dump_rand.py is provided as an example.

About

A STM32F4 based hardware random number generator.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published