All STM32F4 libraries

Because there is a lot of libraries I have done, I will make a table with all of my libraries at one place. When new library will be created, it will be posted here. These libraries work on both Discovery boards, if not, it will be specified. Actually, libraries should work on STM32F4xx series of microcontrollers if they have peripherals that are need for library. All STM32F4xx MCUs don’t have everything inside. 🙂 Libraries are tested on my 4 STM32F4 boards:

  • STM32F429 Discovery (STM32F429ZI)
  • STM32F4 Discovery (STM32F407VG)
  • Nucleo F401 (STM32F401RE)
  • Nucleo F411 (STM32F411RE)

Library structure

Every library, that is uploaded and tested, is also described here on my site. Sometimes I upload some libraries and projects on my Github account, but I don’t release them here. This means that they are not yet fully tested and ready to work, they are still buggy probably. So when I describe my library, each post has Dependencies section. There are 2 main lines, CMSIS and TM. In CMSIS section you have specific core modules, that must be included from standard peripheral libraries, TM section is my section. Some libraries requires my other libraries, so in this case they are in TM section.

Source files

Every library is uploaded to my Github account where you can download it. Also, you can download it from table below. They are updated like libraries on Github. If you need hex files from projects, then you have to go to my github and open project folder. When you are inside project folder, you will find project.hex file. Each project has 3 targets included for STM32F4 boards, so maybe currently .hex file is not created for your board. In this case you need to download repository and open project, select target, compile and download. I’m constantly updating my libraries, so make sure you have the latest version, before you ask for help that something is not working. Maybe someone asked before and I already fixed it. If your problem is still not solved, then post a problem and please provide your code which does not work.

I would be glad, if you post a comment and give me a feedback, how and if these libraries help to you at all.

Github clone

If you have any problems porting my libraries into your projects for some reason, you can download my entire repository from Girhub here. On the right side you have link “Clone in Desktop” or “Download ZIP“. This will allow you to directly open my projects and just hit compile and download. Of course, you have to make sure that you don’t use wrong “target” (set correct MCU) and that you don’t use let’s say LTDC library on F4-Discovery, because F407 MCU don’t have LTDC inside, or use DAC on STM32F401 series, because they don’t have DAC peripheral and so on.


All my softwares are published under GNU GPL v3 license. This means that you are allow to modify, share and use my source and other stuff in personal or commercial use. If you modify source code, it has to stay under GNU GPL v3 license too. I reserve a right to shut down this website at any time.

If you want, you can make a donation to my Paypal account and support my work in future. Paypal link is below.



NR Name Description Download
1 Default project Default project for Keil uVision and Coocox Coide Keil uVision
CooCox CoIDE
2 Led and button Leds and buttons for Discovery boards
3 Delay Delay functions and max core clock
4 USART USART library for all USART peripherals
5 SPI SPI library for all SPI peripherals
6 ADC ADC library to read analog voltage
7 DAC DAC library to convert digital value to analog voltage
8 ILI9341 ILI9341 LCD controller driver without LTDC support
9 I2C I2C library for all I2C peripherals
10 STMPE811 STMPE811 Touch screen library for STM32F429 Discovery
11 BUTTON BUTTON library for ILI9341 LCD and STMPE811 touch screen controller
12 ONEWIRE OneWire library for onewire devices
13 DS18B20 DS18B20 Temperature sensor library
14 SDRAM External SDRAM on STM32F429 Discovery board
15 DS1307 DS1307 External I2C RTC Clock library
16 HD44780 HD44780 (and compatible) LCD driver controller
17 NRF24L01+ NRF24L01+ 2.4GHz transceiver
18 ILI9341 LTDC LTDC support for ILI9341 LCD
19 RTC Internal RTC on STM32F4
20 WATCHDOG Internal Watchdog on STM32F4
21 FATFS Read SD card with SDIO or SPI communication on STM32F4 using FatFs by Chan
22 RNG True random number generator for STM32F4 devices
23 MFRC522 Read RFID Cards with Mifare MF RC522
24 USB CDC Device Virtual COM Port for STM32F4 devices
25 AM2301 AM2301 (DHT21) temperature and humidity sensor
26 ROTARY ENCODER Connect rotary encoder to STM32F4
27 GPS Read GPS data on STM32F4 device
28 L3GD20 Measure axis rotation with STM32F4
29 USB MSC HOST Read USB flash drive with STM32F4
30 HC-SR04 Measure distance with HC-SR04 ultrasonic and STM32F4
31 USB HID HOST Read USB mouse or keyboard with STM32F4 device
32 KEYPAD Read matrix keypad 3 x 4 or 4 x 4 with STM32F4
33 PWM Use all timers for PWM on STM32F4
34 USB HID DEVICE Turn STM32F4 into USB HID Device as keyboard, mouse or gamepad
35 LIS302DL/LIS3DSH LIS302DL or LIS3DSH accelerometers on STM32F4-Discovery board
36 DAC SIGNAL Create signals with STM32F4 and DAC using TIM and DMA
37 BMP180 Read atmosferic pressure with STM32F4
38 EXTI External interrupts for STM32F4 device
39 LOW POWER Power consumption modes for STM32F4
40 MCO OUTPUT Output clocks from STM32F4
41 STDIO Use printf and/or fprintf on STM32F4
42 SERVO Control RC servo with STM32F4
43 MPU-6050 Read accelerometer and gyroscope data with STM32F4
44 IDENTIFICATION Read unique ID, flash and revision from STM32F4
45 BKPSRAM Interface 4kBytes backup SRAM memory on STM32F4
46 SWO DEBUG Debug STM32F4 with SWO feature in Cortex-M4
47 CRC CRC calculation unit on STM32F4
48 PWM IN Measure PWM input signal with STM32F4
49 OTP One-Time programmable memory on STM32F4
50 STemWin STemWin for STM32F429-Discovery board
51 DMA2D GRAPHIC DMA2D ST’s Chrom-ART Accelerator for STM32F429-Discovery board
52 ETHERNET Ethernet on STM32F4
53 GPIO GPIO for STM32F4
54 GENERAL General library for STM32F4
55 USART DMA Extension library for USART library with DMA TX functionality
56 SPI DMA Extension library for SPI library with DMA functionality
57 BUTTON Connect buttons to STM32F4xx
58 STRING Dynamic string allocation for STM32F4xx
59 RCC Dynamic PLL settings for STM32F4xx
60 CPU LOAD Measuring CPU load for STM32F4xx
61 SSD1306 SSD1306 I2C OLED LCD for STM32F4xx
62 FFT FFT library for STM32F4xx
63 DMA DMA library for STM32F4xx
NR Name Description

About defines.h file

All my libraries include defines.h file. This is file, where you can overwrite default settings for libraries (eg. change pins), so it’s important that you have this file inside your project.



Owner of this site. Application engineer, currently employed by STMicroelectronics. Exploring latest technologies and owner of different libraries posted on Github.

You may also like...

Read before commenting!

Before you make a new comment, make sure you agree with things listed below:

  • - Read post to make sure if it is already posted what you are asking for,
  • - Make sure you have the latest version of libraries used in your project,
  • - Make a clean and grammatically correct written message,
  • - Report as many details as possible, including what have you done so far,
  • - Do NOT post any code here. Use Pastebin,
  • - Do NOT post any error codes here. Use Pastebin,
  • - Specify STM32Fxxx family and used Discovery/EVAL/Nucleo or custom made board,
  • - Make sure your clock is set correct for PLL,
  • - If you are using my HAL drivers, please check this post how to start.
Comment will be deleted on breaking these rules without notification!