Skip to main content
PFlor.2
Senior II
March 21, 2023
Solved

STM32 LTDC Simple Text String Output to LCD

  • March 21, 2023
  • 5 replies
  • 3717 views

I have successfully setup the LTDC to work with my LCD to display TouchGFX images with no problems. However, I am also developing a simple bootloader for USB software updates that I need to display text to the display without the use of RTOS or TouchGFX. Anyone have an example of how to achieve this with the STM32 LTDC?

This topic has been closed for replies.
Best answer by Tesla DeLorean

Several examples out there with text, circle, and line drawing primitives

STM32Cube_FW_H7_V1.9.1\Projects\STM32H743I-EVAL\Applications\Display\LTDC_Paint\Src\main.c

STM32Cube_FW_H7_V1.9.1\Projects\STM32H743I-EVAL\Examples\JPEG\JPEG_DecodingFromFLASH_DMA\Src\main.c

5 replies

KDJEM.1
ST Technical Moderator
March 24, 2023

Hello @PFlor.2​ ,

Could you precise the STM32 product you are using?

I recommend you to get inspired from the BSP example.

This example based on STM32F769I-EVAL and described how to display text.

I hope this help you!

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Kaouthar 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
March 24, 2023

Several examples out there with text, circle, and line drawing primitives

STM32Cube_FW_H7_V1.9.1\Projects\STM32H743I-EVAL\Applications\Display\LTDC_Paint\Src\main.c

STM32Cube_FW_H7_V1.9.1\Projects\STM32H743I-EVAL\Examples\JPEG\JPEG_DecodingFromFLASH_DMA\Src\main.c

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
PFlor.2
PFlor.2Author
Senior II
March 24, 2023

Thanks for the tip, I had actually found the LTDC_Paint example and was able to incorporate portions of that example in order to write text to the display! Do you know how the frame buffer works. I use the UTIL_LCD_DisplayStringAtLine() function to display text. However, once at the bottom of the screen I would like to scroll all previous line up one line to make room for the next line of text. How could this be done with the frame buffer to achieve this scrolling??

Tesla DeLorean
Guru
March 24, 2023

The Frame Buffer is a pretty typical line raster format.

Text is constructed from a font bitmap table.

Scrolling is achieved via a memcpy() pulling one or more raster lines forward.

Hardware scroll via a longer buffer, and advancing the start point to the LTDC

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
PFlor.2
PFlor.2Author
Senior II
March 24, 2023

Thanks for the tip, I had actually found the LTDC_Paint example and was able to incorporate portions of that example in order to write text to the display! Do you know how the frame buffer works. I use the UTIL_LCD_DisplayStringAtLine() function to display text. However, once at the bottom of the screen I would like to scroll all previous line up one line to make room for the next line of text. How could this be done with the frame buffer to achieve this scrolling??