Skip to main content
Yogeshk
Associate III
May 11, 2020
Question

Guidance regarding using LTDC Controller in STM32L4R5ZI based Nucleo Board.

  • May 11, 2020
  • 9 replies
  • 2993 views

We are in the initial evaluation stage of using the STM32L5R5ZI module for a custom board we are planning to build for an Engine Panel. Part of the Engine panel is also a LCD-TFT touch screen that we are hoping to drive using the built in LTDC controller which is part of this STM32 Module.

1) Are there any examples/tutorial for this module on how to configure the LTDC Controller and to drive the LCD-TFT especially a touch screen one?

2) One of the questions I had around while configuring the GPIO pins on the Nucleo board that supports this L4R5ZI module was, can we use any of the GPIO pins for the HSYNC, VSYNC, DE, LCD_CLK, and the RGB related pins or can we only choose GPIO pins that have been designated to have alternate functions for ex: LCD_HSYNC, LCD_VSYNC, LCD_CLK etc?

3) Also it seems like lot of the other settings around configuring the Clock frequencies, and other LTDC related settings are driven by the settings called out in the data sheet of the Display device of our choice. Is there any guidance as to how we need to tie/map those settings in the data sheet to the corresponding settings in the LTDC?

Thanks,

Yogesh

This topic has been closed for replies.

9 replies

Yogeshk
YogeshkAuthor
Associate III
May 11, 2020

@Martin KJELDSEN​ any thoughts? We wanted try this out on a Nucleo board NUCLEO-L4R5ZI. and we want to be able to use the LTDC controller to drive the LCD, however since we want to be able to use the ZIO connectors for the GPIO PINS to connect to the external LCD display, are there any restrictions on only using pins that are classified to have an alternate functions of LCD_HSYNC, LCD_VSYNC etc.?

Thanks,

Yogesh

Martin KJELDSEN
Principal III
May 12, 2020

As far as TouchGFX L5 support goes, it's on the list of things to do - soon. LTDC examples will probably appear in CubeFW first, for general STM32 configuration. As AME Support Center said, you can only use the pins classified for LTDC.

Re your datasheet: There should be a pretty good mapping between the datasheet and what you can configure for LTDC in CubeMX. Try it out and let us know if you're having issues.

/Martin

Martin KJELDSEN
Principal III
May 13, 2020

And by TouchGFX Support, i simply mean:

* Direct support in TouchGFX Generator to produce your TouchGFX HAL

* Complete Application Templates for STM32L5 based development boards.

/Martin

AME MCU Support Center BB
ST Employee
May 11, 2020

Only the pins classified to have an alternate function for LTDC.

You can refer to this AN for more details:

https://www.st.com/resource/en/application_note/dm00287603-lcdtft-display-controller-ltdc-on-stm32-mcus-stmicroelectronics.pdf

Yogeshk
YogeshkAuthor
Associate III
May 12, 2020

Thanks AME Support and Martin for taking the time to respond and for the clarification. So in short when I look at the reference manual or the user manual for the L5 Module we plan to use, any of the pins that have the LCD_* alternate function assigned against them, when I load up this nucleo development board in CubeMX, all I have to do is choose those specific pins and choose the alternate function, so that LTDC peripheral can use those pins? Do I have do this explicitly or I don't have to even do that since the LTDC will use those pins as soon as I enable it? I am asking these questions, because eventually we will create a custom board of our own and we will have to tie these pins to the display panel and also I need the clarification because the concept of alternate functions has been a subject of confusion for me :).

@Martin KJELDSEN​  you mentioned that "TouchGFX L5 support goes, it's on the list of things to do", by that did you mean currently a TouchGFX example doesn't exist for the L5 board and that would be made available soon?

Thanks,

Yogesh

Tesla DeLorean
Guru
May 12, 2020

You've got an L4+ series board, not L5, your typo in the top post has confused the ST respondents..

Usually the Data Sheet enumerates the pin tables and alternate function multiplexor options.

https://www.st.com/resource/en/datasheet/stm32l4r5zi.pdf

Each pin has a small and finite number of options. The colour depth in use will determine the number of R, G and B pins involved. The clock, control and sync pins tend to have very few options/alternatives.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Yogeshk
YogeshkAuthor
Associate III
May 14, 2020

Thanks @Community member​  for taking the time to respond. I didn't realize I have been typing L5 :). I have gone thru' most of that document related to LTDC topics and the alternate function pins. Also we know the display we plan to use has a 24 bit bpp. so we will be using all the 24 RGB pins and more to control other things like clock, control and sync related pins. However all I was trying to get a clarification is whether I need to explicitly configure those pins in cubemx that have an alternate function of LCD_* defined or by just enabling the LTDC peripheral in cubemx, these pins automatically are used, without me having to choose and configure those pins?

Thanks,

Yogesh

AME MCU Support Center BB
ST Employee
May 14, 2020

Hello,

If you use CubeMx and enable LTDC it'll use the default LTDC alternate functions.

Then it is up to you to remap the LTDC pins to other possibilities. You need to refer to Table 17. Alternate function in the datasheet.

For example, CubeMx will use by default PE2 for LCD_R0. Then you can manually change it to use PG13 for LCD_R0.

LCD_CLK, LCD_HSYNC, and LCD_VSYNC have one single option: PD3, PE0, and PE1 respectively.

This is per the datasheet:

https://www.st.com/resource/en/datasheet/dm00366448.pdf

Hope it is clear for you now!

Yogeshk
YogeshkAuthor
Associate III
May 14, 2020

Thanks that helps a lot and clarifies my questions.

Thanks,

Yogesh

AME MCU Support Center BB
ST Employee
May 14, 2020

By the way, STM32L4R5ZI devices don't have the LTDC peripheral (LCD_TFT) - Refer to Table 2

https://www.st.com/resource/en/datasheet/stm32l4r5zi.pdf

Yogeshk
YogeshkAuthor
Associate III
May 18, 2020

I am confused, in the features it says the STM32L4R5ZI following regarding the Graphics related features. Does the presence of an LCD-TFT controller not mean it supports LTDC? Also if we want to use these board to eventually drive a 24 bit display, how could we use the LCD-TFT controller to achieve the same as the LTDC?

Advanced graphics features

  • Chrom-ART Accelerator (DMA2D) for enhanced graphic content creation
  • Chrom-GRC (GFXMMU) allowing up to 20% of graphic resources optimization
  • MIPI® DSI Host controller with two DSI lanes running at up to 500 Mbits/s each
  • LCD-TFT controller

Thanks,

Yogesh

Yogeshk
YogeshkAuthor
Associate III
May 18, 2020

It is extremely misleading that on the stm32L4R5ZI product page under key features its list out as shown below. It should be clearly called out on the product page the only thing it supports under graphics feature is chrom-art accelerator and not the other three listed out.

https://www.st.com/en/microcontrollers-microprocessors/stm32l4r5zi.html

Advanced graphics features

  • Chrom-ART Accelerator (DMA2D) for enhanced graphic content creation
  • Chrom-GRC (GFXMMU) allowing up to 20% of graphic resources optimization
  • MIPI® DSI Host controller with two DSI lanes running at up to 500 Mbits/s each
  • LCD-TFT controller

Thanks,

Yogesh

Martin KJELDSEN
Principal III
May 19, 2020

While it does specifically say "Ultra-low-power with FPU ARM Cortex-M4 MCU 120 MHz with 2048 kbytes Flash, USB OTG, DFSDM, CHROM-ART" for L4R5 i agree that also having a description for a _family_ that lists the collective features for that family can seem confusing!

/Martin