Tagged: STM32F4 discovery

Library 22- True random number generator for STM32F4 6

Library 22- True random number generator for STM32F4

STM32F4 devices (in most cases) have True Random Number Generator (or RNG). This peripheral can provide 32bit random number. I made a small library, that you can enable and use it very quickly. RNG on STM32F4 is based on analog circuitry. It makes analog noise and that noice is connected to linear shift register. Analog circuitry is designed from ring oscillators whose outputs are XORed. For RNG circuitry is also separate LFSR clock and is independent from System clock. This...

Library 21- Read SD card with FatFs on STM32F4 582

Library 21- Read SD card with FatFs on STM32F4

Finally I got it working properly. Reading SDcard was very awesome for me for first time, so I decided to make a library for STM32F4xx devices and post it to my website. It’s basically just communication interface between STM32F4 and FatFS library by Chan. It supports SPI or SDIO communication. Library also supports USB communication, but for that purpose you need USB stack too. USB is available here. Below I’m showing how to setup everything with STM32F4 to get SD...

Watchdog timer on STM32F4 11

Library 20- Independent watchdog timer on STM32F4

Sometimes you need watchdog timer to look at your system if it gets stuck. I made a little library to work with it. Watchdog in STM32F4xx device has it’s own clock which is independent from main system clock. You have to constantly reset it’s counter value or it will elapse and reset MCU. Watchdog Library Features Detect if system was reset by watchdog Supports different timeouts Reset watchdog

Library 19- Use internal RTC on STM32F4 97

Library 19- Use internal RTC on STM32F4

It’s been some time when I post last library. Next one is internal RTC library. STM32F4xx devices have Real Time Clock (RTC) inside, with support of internal calibrated 32768 Hz oscillator or external (more accurate) 32768 Hz oscillator. RTC peripheral has also backup register support, which means that when you reset MCU, registers are not reset or if power is off and you have battery connected on Vbat pin, clock is still working. RTC can also wakeup MCU from all...

NRF24L01+ 2.4GHz RF Module 229

Library 17- nRF24L01+ for STM32F4

17th library is here. I will show how to basic communicate with 2 nRF24L01+ RF transceivers. The Nordic nRF24L01+ is a highly integrated, ultra low power (ULP) 2Mbps RF transceiver IC for the 2.4GHz ISM (Industrial, Scientific and Medical) band. With peak RX/TX currents lower than 14mA, a sub μA power down mode, advanced power management, and a 1.9 to 3.6V supply range, the nRF24L01+ provides a true ULP solution enabling months to years of battery life from coin cell...

HD44780 LCD Example 107

Library 16- Interfacing HD44780 LCD controller with STM32F4

16th library is here. We will interfacing HD44780 (and its compatible) driver for alpha-numeric LCDs. Library supports up to 20 x 4 LCD size. It was tested with 20 x 4 (on picture) and with 16 x 2. HD44780 Library Features 4bit operation mode Minimum GPIOs used (6) Supports different LCD sizes Supports up to 8 custom characters Enable/disable cursor blinking Show/hide cursor Shift content in ram left/right Connection pins to board are user selectable Automatically jumps to new line...