First STM32F7xx libraries are out!

After one day spending trying to make a good implementation of libraries for future use, I decided to switch to HAL drivers because of STM32F7 line which does not have STD drivers.

So I decided to make libraries that way, that are supported also with STM32F4xx lines. Each line uses HAL driver for it’s version, but all projects are done in a way that you select target in Keil uVision (F4 or F7), click rebuild and everything is setup and ready for start.

Supported devices

For start, I have to say that you need to have installed newest packs in Keil (if you use it) for F7 and F4 lines to be able to use these libraries and projects provided by me. I’ve managed to get properly in working state these boards:

  • STM32F4-Discovery with HSE 8MHz clock
  • STM32F429-Discovery with HSE 8MHz clock
  • STM32F401-Discovery with HSI 8MHz clock
  • STM32F439-EVAL with HSE 25MHz clock
  • STM32F401-Nucleo with HSE 8MHz and HSI 16MHz clock
  • STM32F411-Nucleo with HSE 8MHz and HSI 16MHz clock
  • STM32F7-Discovery with HSE 8MHz

My plan is to support F0 series also, because with F4/F7 series you get mainstream power, but F0 can be used for small projects. There is not need for F1,F2 or F3.

Current libraries

So, for start, I’ve made these libraries (Already posted on Github) which are compatible with F4 and F7 lines:

  • RCC: For setting up clock control for your board, supporting internal or external clock, support for enabling I and D cache for F7 series
  • GPIO: For controlling GPIO pins
  • DELAY: For delay functions using Systick and DWT counter
  • EXTI: For external interrupts
  • DISCO: For leds and buttons for all F4 nucleo board, F4 discovery boards, F439 Eval board and F7-Discovery board
  • ONEWIRE: For onewire-based devices like DS18B20
  • DS18B20: For controlling/reading DS18B20 temperature sensor
  • USART: For communication with UART protocol
  • SPI: For SPI communication
  • GENERAL: General library for different things
  • CRC: CRC calculation unit
  • SDRAM: For SDRAM communication on F429-Discovery/Eval and F7-Discovery boards
  • LCD: Single library for STM32F7-Discovery, STM32F439-Eval and STM32F429-Discovery LCD boards using LTDC and DMA2D
  • BUTTON: To control multiple buttons using STM3Fxxx devices
  • FFT: FFT example using LCD
  • IWDG: Independent watchdog library
  • RNG: Generate random number in STM32Fxxx
  • CPU LOAD: Measure CPU load using sleep mode and DWT counter
  • STRING: Create strings on STM32Fxxx devices
  • ROTARY ENCODER: Rotary encoder for STM32Fxxx devices
  • I2C: To use up to 4 I2C peripherals at a time
  • TOUCH: For touch controllers on STM32F7-Disco and STM32F439-Eval boards (built-in) or any other touch controller user can imagine with support for touch orientation to match LCD orientation.
  • RTC: For internal RTC on F4 and F7 lines

All libraries are tested on these boards:

  • STM32F7-Discovery
  • STM32F429-Discovery
  • STM32F439-EVAL

For now, libraries are only available on my Github account where you can download it with default project for Keil uVision. Libraries are almost fully compatible with my previous for STD drivers on F4xx lines. Only some functions are added/changed because now are used HAL drivers and not STD anymore.

You can select your target in Keil uVision (F4xx or F7xx) and hit rebuild and then download. You are ready to RUN!

I’m waiting for your opinion about that feature supporting more series with single library file.


This is a simple example from my “project template” used for turn on and off leds with button.

Check my GITHUB account with new repository for new library system.


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