Monthly Archive: July 2014

RFID 34

Library 23- Read RFID tag with MF RC522 on STM32F4

In this library I’m talking about RFID (Radio-Frequency IDentification). Radio-frequency identification (RFID) is the wireless non-contact use of radio-frequency electromagnetic fields to transfer data, for the purposes of automatically identifying and tracking tags attached to objects. The tags contain electronically stored information. Some tags are powered by and read at short ranges (a few meters) via magnetic fields (electromagnetic induction). Others use a local power source such as a battery, or else have no battery but collect energy from the interrogating EM field,...

Library 22- True random number generator for STM32F4 5

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 510

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 86

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...