Back to Trending
RepositoryCHUHungary
RobertoBenjami

RobertoBenjami/stm32_graphics_display_drivers

STM32 LCD drivers (currently: spi(dma), gpio, fsmc(dma), st7735, st7783, ili9325, ili9328, ili9341, ili9486, ili9488, hx8347g)

703stars
123forks
8issues
1views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: touchscreen

#1 Repository of the month

1
TINIX TRENDING·Topic: ili9325

#1 Repository of the month

1
TINIX TRENDING·Topic: st7735

#1 Repository of the month

STM32Fxxx graphics display drivers

Layer chart, examples circuits and settings:

LCD I/O and touchscreen I/O driver:

  • lcd_io_spi: software SPI, hardware SPI, hardware SPI with DMA
  • lcd_io_gpio8: 8 bit paralell without analog resistive touchscreen
  • lcd_io_gpio16: 16 bit paralell without analog resistive touchscreen
  • lcd_io_fsmc8: 8 bit paralell without analog resistive touchscreen + FSMC or FSMC with DMA
  • lcd_io_fsmc16: 16 bit paralell without analog resistive touchscreen + FSMC or FSMC with DMA
  • lcdts_io_gpio8: 8 bit paralell with analog resistive touchscreen
  • lcdts_io_fsmc8: 8 bit paralell with analog resistive touchscreen + FSMC or FSMC with DMA
  • ts_xpt2046: XPT2046 touchscreen driver, software and hardware SPI, 4 or 5 wires
  • lcdts_io_spi_xpt2046: LCD and XPT2046 in common SPI, software and hardware SPI with DMA (DMA only in LCD)
stm familyspigpio8gpio16fsmc8fsmc16ts_gpio8ts_fsmc8ts_xpt2046spi_xpt2046note
STM32F0+++
STM32F1+++++
STM32F2+++++++++
STM32F3+++
STM32F4+++++++++
STM32F7+++
STM32G0++not tested
STM32G4++not tested
STM32L0+++not tested
STM32L1+++
STM32L4+++not tested
STM32L5++not tested
STM32H7++

LCD driver:

  • st7735 (SPI mode tested)
  • st7783 (8 bit paralell mode tested)
  • ili9325 (8 bit paralell mode tested)
  • ili9328 (8 bit paralell mode tested)
  • ili9341 (SPI, 8 bit and 16 bit paralell mode, SPI with LTDC mode tested)
  • ili9486 (8 bit paralell mode tested)
  • ili9488 (SPI, 8 bit paralell mode tested)
  • hx8347g (8 bit paralell mode tested)

App:

  • LcdSpeedTest: Lcd speed test
  • TouchCalib: Touchscreen calibration program
  • Paint: Arduino paint clone
  • JpgViewer: JPG file viewer from SD card or pendrive
  • AnalogClock: Analog Clock demo (printf: the result, i use the SWO pin for ST-LINK Serial Wire Viewer (SWV). See:examples/Src/syscalls.c)
  • 3d filled vector (from https://github.com/cbm80amiga/ST7789_3D_Filled_Vector_Ext)

How to use starting from zero?

  1. Create project for Cubemx or CubeIDE
  • setting the RCC (Crystal/ceramic resonator)
  • setting the debug (SYS / serial wire or trace assyn sw)
  • setting the timebase source (i like the basic timer for this)
  • if FSMC : setting the FSMC (chip select, memory type = LCD, Lcd reg select, data = 8 or 16 bits, timing)
  • if SDCARD : setting the SDIO mode, enable the FATFS, FATFS: USE_LFN, MAX_SS = 4096, FS_LOCK = 5, RTC enabled
  • if USB pendrive : setting the USB host, setting the USB power, enable the FATFS, USE_LFN, MAX_SS = 4096, FS_LOCK = 5
  • if JPG : enabled the LIBJPEG
  • setting the clock configuration
  • project settings: project name, toolchain = truestudio, stack size = 0x800
  • generate source code
  1. Truestudio or CubeIDE
  • open projects from file system (only Truestudio)
  • open main.c
  • add USER CODE BEGIN PFP: void mainApp(void);
  • add USER CODE BEGIN WHILE: mainApp();
  • open main.h
  • add USER CODE BEGIN Includes (#include "stm32f1xx_hal.h" or #include "stm32f4xx_hal.h" or ...)
  • add 2 new folder for Src folder (App, Lcd)
  • copy file(s) from App/... to App
  • copy 4 or 7 files from Drivers to Lcd (lcd.h, bmp.h, stm32_adafruit_lcd.h / c, if touch: ts.h, stm32_adafruit_ts.h / c)
  • copy Fonts folder to Lcd folder
  • copy io driver to Lcd folder (lcd_io_...h / c or lcdts_io...h / c or...)
  • copy lcd driver to Lcd folder (st7735.h / c or ili9325.h /c or...)
  • if printf to SWO : copy syscalls.c to Src folder
  • setting the configuration the io driver header file (pin settings, speed settings etc...)
  • setting the LCD configuration (orientation, touchscreen)
  • add include path : Src/Lcd
  • setting the compile options (Enable paralell build, optimalization)
  • compile, run ...

Example (please unzip the app you like):

  • f103c8t_app: (stm32f103c8t HAL applications, cubemx, truestudio)
  • f103c8t_app_rtos: (stm32f103c8t HAL-FreeRtos applications, cubemx, truestudio)
  • f407vet_app: (stm32f407vet HAL-applications, cubemx, truestudio)
  • f407vet_app_rtos: (stm32f407vet HAL-FreeRtos applications, cubemx, truestudio)
  • f407vet_app_fsmc: (stm32f407vet HAL applications, FSMC, cubemx, truestudio)
  • f407vet_app_rtos_fsmc: (stm32f407vet HAL-FreeRtos applications, FSMC, cubemx, truestudio)
  • f407vet_app_fsmc16: (stm32f407vet HAL applications, FSMC 16 bit, cubemx, truestudio)
  • f407zet_app_fsmc16_extsram: (stm32f407zet HAL applications, FSMC 16 bit, external 1MB SRAM, cubemx, truestudio)

https://lujji.github.io/blog/stlink-clone-trace/

Similar Projects

Discover other similar projects and AI models.

RepositoryC
RobertoBenjami/stm32_hal_graphics_display_drivers

STM32 graphics LCD and Touchscreen drivers (LCD: st7735, st7781, ili9325, ili9328, ili9341, ili9488, Touch: analog resistive, xpt2046, stmpe811)

116
Nov 15, 2024
RepositoryC
nopnop2002/esp-idf-ili9340

SPI TFT and XPT2046 touch screen controller driver for esp-idf

263
Nov 24, 2026
RepositoryC
nopnop2002/esp-idf-parallel-tft

8bit parallel TFT & 4-line resistance touch screen Driver for esp-idf using i2s paralell mode

135
Sep 25, 2026
RepositoryC
maudeve-it/ILI9XXX-XPT2046-STM32

A set of function handling SPI, TFT LED 480x320 or 320x240 touch display controlled by an ILI9488 or ILI9341+XPT2046

78
May 6, 2026
RepositoryC
Genymobile/scrcpy

Display and control your Android device

156.4k
Dec 1, 2026
RepositoryC
obsproject/obs-studio

OBS Studio - Free and open source software for live streaming and screen recording

80.4k
Nov 29, 2026
RepositoryC
FFmpeg/FFmpeg

Mirror of https://git.ffmpeg.org/ffmpeg.git

68.4k
Nov 29, 2026
RepositoryC
git/git

Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documentation/SubmittingPatches procedure for any of your improvements.

64.6k
Nov 30, 2026
RepositoryC
curl/curl

A command line tool and library for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, MQTTS, POP3, POP3S, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET, TFTP, WS and WSS. libcurl offers a myriad of powerful features

43.7k
Nov 28, 2026