Skip to main content
FJB2069
Senior
September 22, 2025
Question

bootloader with simple text to lcd stm32F7

  • September 22, 2025
  • 1 reply
  • 365 views

I have a custom stm32f746 project.  Touchgfx main app is working.  LCD is 800x480

I developed a bootloader that is also working.

Now just want minimum necessary peripherals to allow simple TEXT output to LCD to show bootloader status.  Trying to keep bootloader to ~64k, so no TouchGFX.

But, I have setup FMC, MPU, and LTDC similar to the main TouchGFX app.

I am able to print 3 colored bars to the screen:  

FJB2069_0-1758500474689.png

 

 uint16_t *fb = (uint16_t*)0xC0000000; // RGB565 view
 const int W = 800, H = 480;
 for (int y = 0; y < H; ++y) {
 uint16_t color =
 (y < H/3) ? 0xF800 : // Red
 (y < 2*H/3) ? 0x07E0 : // Green
 0x001F; // Blue
 for (int x = 0; x < W; ++x) fb[y*W + x] = color;
 }

Then when I try to print a smaller green box, it still fills across the width of the screen, distorted, and does not go from 40,320?:

FJB2069_1-1758500516148.png

 

 for (int y = 40; y < 120; ++y)
 for (int x = 40; x < 320; ++x)
 fb[y*800 + x] = 0x07E0;

Then when I try to write text I get a thin fluctuating line across screen,  I also tried to create a larger font to see if I could make out any characters, but it looked the same:

FJB2069_2-1758500722469.png

 

 lcd_puts("BOOTLOADER LCD ONLINE.\r\n");

 Tried multiple iterations trying to get text to show. 

Not sure if IOC file is not setup correctly.  Something must be set correctly to get red,green,blue bars, just can't figure out why I can't get BOX to show or any TEXT?

I have attached my IOC file along with lcd_console.c and main.c

Appreciate any insight on what I am doing wrong!

 

1 reply

FJB2069
FJB2069Author
Senior
September 22, 2025

I figured out the issue,  I was running the LCD frequency at 25MHz.  My TouchGFX was at 24Mhz.  I didn't think that was an issue (1 MHZ), but when I ran it at 16MHZ, TEXT worked!