Library 50- STemWin for STM32F429-Discovery

ST provides emWin library from Segger. It is professional GUI (Graphical User Interface), optimized for speed and performance for microcontrollers. ST has it’s own implementation, called STemWin. With this GUI, you can do many thing, of use simple buttons, dialogs, text boxes, to playing videos, displaying pictures, menus, etc. I suggest you that you go to segger’s website and read more about this very useful tool.

In my library, I’ve some changes from original ST’s example for STM32F429-Discovery board, because it has external ram (which is necessary for professional GUI) and LCD on board.

This library is just implementation (behind the scenes) to get emWin in working state on discovery board. How and what to do to use it is on you to take a look on emWin datasheet.

Library

Features

  • Use GUI on STM32F429-Discovery board
  • Compatibility with emWin professional GUI
  • External ram is used
  • 1 Layer
  • Screen rotation supported
  • Touch screen supported

Dependencies

  • STM32F4xx
    • STM32F4xx
    • STM32F4xx RCC
    • STM32F4xx GPIO
    • STM32F4xx FMC
    • STM32F4xx LTDC
    • STM32F4xx DMA2D
    • STM32F4xx SPI
    • STM32F4xx I2C
  • TM
    • TM SPI
    • TM I2C
    • TM GPIO
    • TM STMPE811
    • TM ILI9341 LTDC
    • TM SDRAM
    • TM FONTS
    • TM DELAY
    • defines.h
    • All files are in one packet at the end of this post

Screen rotation

I’ve made support for screen rotation. You need more ram if you want screen rotation. By default this mode is disabled and if you want to use it, you have to open defines.h file, and add define like one below:

Then look at my functions and enumeration section to see how to properly use function for rotate screen.

Functions and enumerations

Example

  • Example below provides you one progress bar and 5 buttons
  • first button is to activate other 4 buttons
  • 4 buttons are for on/off 2 leds on discovery board
ST emWin button waits to be pressed

ST emWin button waits to be pressed

ST emWin button already pressed

ST emWin button already pressed



Project available on Github, download library 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...

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!