Skip to main content
Senior III
June 12, 2026
Solved

CubeMX generates different HAL_LTDC_MspInit in Boot and Apli despite same config

  • June 12, 2026
  • 2 replies
  • 28 views

I’m using CubeMX to generate the code for the STM32H7S7, more preciously the LTDC code that should be the same for Boot and the Appli

For some reason the HAL_LTDC_MspInit is generating different pins configurations for the Appli and the Boot

For instance it generates the code for the PIN     PF0     ------> LTDC_R2 in the boot meanwhile in the Appli there’s no PF0

I would like to attach my .ico but it seems there’s no attach option in the new community UI

Best answer by nico23

It turns out that selecting RGB888 and then RGB565, some pins (like PF0) got set in yellow, and when generating the code, some pins are in boot and some are not; when switching back to RGB888, the pins return correctly

2 replies

ST Technical Moderator
June 12, 2026

Hello ​@nico23 

Thanks for sharing your feedback in the ST community
Could you provide more details about your LTDC configuration (display type) and the MCU name you are using?

KR, Souhaib

To give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
nico23AuthorBest answer
Senior III
June 15, 2026

It turns out that selecting RGB888 and then RGB565, some pins (like PF0) got set in yellow, and when generating the code, some pins are in boot and some are not; when switching back to RGB888, the pins return correctly