
Demonstrate a microcontroller–based embedded graphics system with a display module, frame buffer, and pixel streaming to a display driver; cover interfaces, memory, LTDC, and LVGL.
Select an stm32 hardware setup for this course by comparing discovery kits and lcd shields, including stm32f429zi, stm32f746ng, and stm32f407 with a spi ili9341 lcd.
Install stm32cubeide on Windows by downloading from the official ST link and installing to the C drive, then launch the IDE with the default workspace.
Download the LVGL sample project, flash the Roaring_tiger_demo to the F429 discovery board, and import, build, and run it in STM32CubeIDE to explore hardware behavior.
Build the F746x project, then use run as to download the demo onto the STM32F746-DISC hardware and observe the board's output.
Connect the external 2.4-inch LCD module to the STM32F407 discovery board via SPI using the SPI2 peripheral, ensure 5V power, and run the F407x project to view the demo.
Describe how LCD modules connect to STM32 microcontrollers, including the 22 signals and SPI-based LCD driver chip programming on the STM32F429 Discovery kit.
Explain how an RGB display uses red, green, and blue signals to render colors, and introduce key terms such as pixel, pixel density (ppi), bit depth, pixel format, and resolution.
Explore important pixel formats for embedded graphics, including ARGB8888, RGB565, and L8, and learn how memory use and alpha, grayscale, and color lookup tables affect frame buffers.
Explore pixel density and resolution, defining ppi as pixels per inch and its impact on image clarity. Compare hd and hd+ resolutions like 1280x720 and 1600x900 to explain display resolution.
Convert bitmap images to a C array and store them in flash, calculating memory from width, height, and bytes per pixel while matching the LCD's supported pixel formats like rgb565.
Explore how the LTDC peripheral transfers C-array frame buffers to the LCD-TFT display via a 24-bit RGB interface, using memory addresses and peripheral enable.
Explore display interface types, focusing on MIPI DPI (rgb interface) and MIPI DBI, and LTDC interactions with displays. Learn data widths (16/18/24-bit) and signals (vsync, hsync, de, pclk).
Learn how the LTDC host controller uses vsync, hsync, and data enable to frame and line timing, while dot clock and 24-bit RGB data lines drive the display.
Analyze RGB interface signals from an STM32 LTDC trace to understand dot clock, DE, HSYNC, VSYNC, porches, and frame timing, and configure LTDC for ILI9341 LCD modules.
Display vibgyor bars from scratch on STM32 with CubeIDE, set up clocks and framebuffer, and send the framebuffer over SPI to the LCD; videos cover LTDC and periphery details.
Configure the main system clock (SYSCLK) of the STM32F429 via the PLL engine, choosing HSI or HSE input and setting M, N, and P to reach up to 180 MHz.
Begin configuring the system clock by setting pll_m to 0x8 via reg_set_val, using RCC_BASE with a pRCC pointer, and prep for pll_n and pll_p in the next lecture.
Configure M, N, and P in RCC PLLCFGR via device macros, then enable the PLL to drive the clock tree and set the pixel clock to 6–8 MHz for ILI9341.
Configure the PLLSAI to generate lcd_clk for the lcd and set the AHB/APB clocks via RCC prescalers HPRE, PPRE1, PPRE2 to 180 MHz, 45 MHz, and 90 MHz.
Enable the main PLL, wait for PLLCLK and PLLSAI readiness, switch to PLL as SYSCLK, and configure flash latency in FLASH_ACR to match the new HCLK.
Configure flash wait states to 5, enable over‑drive (vos 3) through the power register, then switch pllclk to sysclk and verify a 180 mhz system clock.
Examine the system clock setup code for stm32f407 and stm32f746 discovery boards, adjust pll_n, overdrive, and lcd_clk via the rcc pll_sai block, and verify with an oscilloscope.
Configure the STM32 SPI peripheral to drive the ili9341 LCD programming interface, using SPI5 in half-duplex master mode with a bidirectional SDA data line and essential GPIO control signals.
Demonstrate creating bsp_lcd.c and bsp_lcd.h, implementing BSP_LCD_Init to initialize LCD pins and LTDC, and managing MCU-specific macros for STM32F429 and STM32F407.
Implement pin and SPI initialization for STM32 LCD, enable AHB1 clocks, configure pins for output, reset the LCD, and send configuration commands.
Replace position macros with LCD_RESX_PIN and related macros, define pins 0 to 15, and initialize the reset, CSX, and DCX pins. Then compile the code to confirm the project builds.
Configure the GPIO pins for SPI functionality on STM32 by setting PF7 as SPI clock and PF9 as SPI5 MOSI with alternate function 5, using AFR registers.
Configure the SPI5 peripheral in controller mode with bidirectional single data line, enable the APB2 clock, set 8-bit data, baud rate around 5 MHz, and enable SPI in mode 0.
Learn to interface an external lcd to stm32f407 using two unidirectional spi lines (sdi and sdo) instead of bidirectional mode, and initialize pins, spi, and lcd via bsp_lcd and lcd_config.
Learn to initialize the ILI9341 TFT-LCD over SPI by configuring RESX, CSX, and D/CX signals. Implement commands and parameters via LCD_Write_Cmd and LCD_Write_Data and validate TXE/BSY flags.
Enable the spi peripheral, configure bidirectional data, and verify tft-lcd command sequences with a logic analyzer to ensure proper cs timing and end-of-transfer handling.
Configure the LTDC peripheral, including pin initialization, layer setup, color look-up table, frame buffer handling, and timing for RGB565 displays.
Create macros in bsp_lcd.h for LTDC rgb pins and ports, then implement the pin array and for loop to initialize them to the LTDC alternate function, enabling clocks in AHB1ENR.
Configure the LTDC peripheral to produce a red background by enabling the LTDC clock in RCC APB2ENR, setting horizontal and vertical sync timings, and enabling LTDC.
Configure the LTDC peripheral by setting horizontal and vertical sync timings, accumulated values, and total widths. Enable LTDC using BSP LCD macros and adjust for landscape mode if needed.
Learn LTDC background testing by enabling LTDC clock, configuring horizontal and vertical synchronization timings, loading red in BCCR, and validating on hardware; adjust to fill screen and test blue.
Analyze LTDC signals trace by measuring dotclk, hsync, vsync, and data enable to verify timing, with dotclk around 6 MHz, hsync ~56.6–57.6, vsync ~18.5, and Tframe ~18.8.
Explore LTDC layers initialization with two frame buffers, blending by constant alpha, and per-layer windowing. Configure layer registers, frame buffer addresses, and shadow reloads for reliable display.
Learn LTDC layer initialization and windowing by configuring pixel format, blending, layer position, and frame buffer address, using shadow registers and immediate reload for Layer 1 in a STM32 project.
Learn LTDC layer initialization by configuring frame buffer height, line length, total lines, and address, using a 100×50×2 example; verify with BSP_LTDC_LAYER_WIDTH and prototype in bsp_lcd.h, then compile.
Activate the LTDC layer and set the frame buffer background color via set_fb_background_color, converting RGB888 to RGB565 per the pixel format.
Display seven color bars in landscape mode using the LCD fill rectangle function with rgb888 colors across the full 320x240 screen, preparing for portrait mode in the next lecture.
Learn to switch lcd orientation to portrait by configuring the memory access control register (36h) with MV, MY, and MX bits and adjusting CASET and RASET for 240×320.
Relaunch the project, test portrait mode by adjusting the LCD width to 239 and color bar height, then set MX and MY to 1 to correct orientation.
Explain pixel writing to an external LCD over SPI for stm32f407x, comparing non-DMA and DMA methods, with 10 kilobytes draw buffers, CASET/RASET, and rgb565 16-bit data.
Set the external LCD background color on the F47 Discovery board with bsp_lcd_set_background_color, choosing red, then compile and upload to see the screen painted red.
Master windowing on stm32f407x with an ili9341 lcd by using set_display_area to define a region, issue the write command (2Ch), and send red pixel data to paint the display area.
Display vibgyor bars on an external LCD using the bsp_lcd_fill_rect API, with a black background and landscape orientation. Toggle to portrait orientation, reflash the code, and verify the display.
Explore LVGL, a lightweight graphics library for embedded GUIs, using its simulator download and apps, integrate LVGL into STM32 projects, and run widgets, animations, and event callbacks on lcd-tft displays.
Explore lvgl simulator sample applications by uncommenting code to run get_started and get_started_2 demos, observe button widgets and event callback, lv_scr_act, and dropdown_create APIs.
Clone the lvgl repository, create an STM32CubeIDE project, and enable LTDC and SPI peripherals to run lvgl samples on the STM32F429 discovery board using RGB666 and a 180 MHz clock.
Add the lvgl source files and examples to the stm32 cube project, enable i2c3, include lvgl headers, and initialize lvgl with lvgl_init, tft_init, and touchpad_init, plus lv_tick_inc and lv_timer_handler.
Analyze memory usage and optimize lvgl on the stm32f429 board by inspecting the memory map and bss growth, then adjust lv_mem and draw buffers to fit ram constraints.
Learn to run the lvgl sample on stm32f746 and stm32f407 discovery boards by integrating lvgl sources, lvgl.h, lv_conf.h, and the BSP, with correct include paths.
Explore an RGB mixer demo using LVGL with RGB sliders and a color rectangle, learning LVGL objects, callbacks, and how to run on the simulator before hardware testing.
Explore LVGL objects as widgets, their basic and special attributes, and lv_obj_t handles for screens and displays. Build an RGB mixer in a simulator and port to STM32 with LVGL.
Learn to set up a lvgl project in the simulator, add rgb_mixer.c and rgb_mixer.h, create and center a base lvgl object, and prepare for a slider with lv_slider_create.
Create a slider for the red component with lv_slider_create and lv_scr_act as the parent. Focus on one slider at a time, commenting the others to distinguish r, g, and b.
Learn object alignment in lvgl by using lv_obj_align and lv_obj_align_to to position sliders with x and y offsets, then create and size a base object aligned to top_mid.
Color the slider parts with lv_obj_set_style_background_color_bg_color, set red for the indicator and knob via the selector (where and when), while keeping the main part default.
Apply border styling to a base object in lvgl by setting border_color and border_width, previewing a 5-pixel border, and preparing to add labels in the next lecture.
Implement a rgb mixer interface by creating and aligning labels for red, green, and blue sliders, using lv_label_create, label_set_text, and lv_obj_align, and prepare for slider callbacks with a rgb_mixer_t structure.
Learn to add a single LVGL event callback for multiple sliders, handle value changed events, update slider value labels, and set ranges 0 to 255 to drive rectangle color updates.
Implement a color update callback in LVGL, mapping sliders to RGB via color_make and applying it to the rectangle background; prepare a new STM32 LVGL project for testing.
Test and debug a rgb_mixer UI on the STM32F429 discovery board using lvgl v9, rotate the display with lv_disp_set_rotation and software rotation in tft_init, and validate touch sliders.
Test the rgb_mixer app on stm32f746 and stm32f407 discovery boards, using lvgl lv_pct to make UI sizes responsive across three displays and verify touch functionality.
Create a digital clock that shows current date and time and provides a LVGL-based settings interface for date, time, alarm, display brightness, and sound.
Demonstrates running the digital clock project in the simulator. Copy inc and src, configure lv_conf and includes, build, and run with alarm settings, and discuss LVGL and RTC timing.
Describes touch screen controller interfacing on three STM32 boards, detailing resistive 4-wire panels with onboard ADC and I2C3, capacitive panels with SPI/I2C, and XPT2046 based touch tech for external LCD.
Test the lvgl-based stm32 project on a F429 discovery board by configuring lv_conf.h, enabling sdram and frame buffer, and integrating sdram.c, sdram.h, and bsp_f4x SDRAM drivers via FMC.
Create and configure LVGL menus to navigate between home, about us, and contact pages using lv_menu_set_page and lv_menu_set_load_page_event.
In this course, you learn the embedded graphics systems and programming part of it along with using LVGL for creating UI applications.
In the first part of the course, you will learn,
1. Basics of embedded graphics systems
2. how to interface an LCD-TFT display to the microcontroller board.
3. How to use the LTDC peripheral of the STM32 microcontroller,
4. How to communicate between the microcontroller and the TFT display using MIPI DPI and MIPI DBI
5. Bare metal programming
In this part you are going to write all the code, completely from scratch, that is using register-level programming.
In the second part, you will learn,
1. Introduction to LVGL ( an open-source graphics library for microcontrollers)
2. Using LVGL in STM32 projects
3. LVGL widgets and their usage, APIs
4. Create UI application using LVGL
5. Testing LVGL application on PC simulator and different STM32 development boards
6. Student project
In this course I will show you how you can create an embedded graphics application for 3 different boards simultaneously
you can either use the STM32F429 Discovery board or STM32F74x Discovery board or you can use any STM32 board with external TFT LCD interfaced via the SPI interface.
Please read the course description carefully and you may also watch free preview videos before enrolling in this course.
Hardware requirements:
If you want to test the code developed for target hardware, you would need any one of the below-mentioned board
For more information please watch the preview videos above.
1. 32F429IDISCOVERY Discovery kit with STM32F429ZI MCU (Explained in the course)
or
2. 32F746GDISCOVERY Discovery kit (STM32F746NG MCU) (Explained in the course)
or
3. STM32F7508-DK Discovery kit with STM32F750N8 MCU
or
4. STM32F4DISCOVERY Discovery kit with STM32F407VG MCU + External ILI9341 TFT-LCD interfaced via SPI (Explained in the course)
or
5. Any stm32 board + External ILI9341 TFT-LCD interfaced via SPI
6. USB logic analyzer (Optional )
7. Jumper wires if you are using hardware option 4 or 5
Note: LVGL applications can be tested on a PC simulator without the need for any target hardware.
Software requirements:
STM32CUBEIDE
Learning order of FastBit Embedded Brain Academy Courses,
If you are a beginner in the field of embedded systems, then you can take our courses in the below-mentioned order.
This is just a recommendation from the instructor for beginners.
1) Microcontroller Embedded C Programming: absolute beginners(Embedded C)
2) Embedded Systems Programming on ARM Cortex-M3/M4 Processor(ARM Cortex M4 Processor specific)
3) Mastering Microcontroller with Embedded Driver Development(MCU1)
4) Mastering Microcontroller: TIMERS, PWM, CAN, RTC,LOW POWER(MCU2)
5) Mastering Microcontroller: STM32-LTDC, LCD-TFT, LVGL(MCU3)
6) Embedded System Design using UML State Machines(State machine)
7) Mastering RTOS: Hands-on FreeRTOS and STM32Fx with Debugging(RTOS)
8) ARM Cortex M Microcontroller DMA Programming Demystified(DMA)
9) STM32Fx Microcontroller Custom Bootloader Development(Bootloader)
10) Embedded Linux Step by Step using Beaglebone Black(Linux)
11) Linux device driver programming using Beaglebone Black(LDD1)
Other programming courses
1) Master The Rust Programming Language : Beginner To Advanced