HAL library 12- LCD for STM32Fxxx

LCD is first big library provided from me. It’s the same as SDRAM, it works on STM32F429-Discovery, STM32F439-EVAL and STM32F7-Discovery boards. With one library you can control 3 boards just by selecting proper define in your target.

Library can be extended to other boards. Library requires FMC peripheral for SDRAM for display memory, DMA2D for fastest graphic accelerations and LTDC for transferring layers to LCD.

Library

Read more about new HAL libraries

Features

  • Supports STM32F429-Discovery board
  • Supports STM32F439-EVAL board
  • Supports STM32F7-Discovery board
  • Supports DMA2D graphic acceleration for fastest drawing operations
  • Supports screen rotation
  • Supports multiple fonts
  • And more

Dependencies

  • HAL
  • TM
    • STM32Fxxx HAL
    • defines.h
    • TM GPIO
    • TM SDRAM
    • TM DMA2D GRAPHIC
    • TM FONTS
    • TM SPI when STM32F429-Discovery is used

Board pinouts

LCD pins are different for different board. Using proper defines (explained below) you can select which board is used.

For full pinout list, download and open LCD library and check header file with description.

Board selection

The most important thing is to tell library, which board is used in target system. There are 2 possible ways to do that. One (and I prefer it) is to check my DISCO library and follow instructions which define you have to set for proper board, and another, explained below.

If you choose option one, then you will have no worries in my future libraries where library needs to know exactly which board is used!

The second option (I don’t prefer it) is, to set define only for this library. Copy define corresponding to your board into defines.h file or make a global defines in compiler’s settings. I made global defines in Keil uVision under “Options for Target” -> “C/C++” tab.

Functions and enumerations

Example

Single LCD library for different boards

Single LCD library for different boards



Project is available on Github, download all libraries below.

 

tilz0R

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