cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F469 LTDC doesn't load from the configured frame buffer, Displays only gibberish, Can't configure the background-color

EM.1
Associate II

I have designed a custom board with the STM32F469BET microcontroller, and have configured all the necessary IO's and drivers for the display,

The LTDC is configured with the proper variables (Probbebliy),

The display turns on and loads a gibberish image, (as nothing is yet in the frame buffer)

I have set up a framebuffer in the internal RAM (just to test the displays colors)

#define FRAME_SIZE 10000
uint8_t *frame_buffer;
 
uint8_t fram_buff[FRAME_SIZE];
 
  //frame_buffer = malloc(100000);
  frame_buffer = &fram_buff;
 
  HAL_LTDC_SetAddress(&hltdc, frame_buffer, LTDC_LAYER_1);
 
  int i = 0;
 
  while(i < FRAME_SIZE){
      fram_buff[i] = 0xFF;
      fram_buff[i + 1] = 0x00;
      fram_buff[i + 2] = 0x00;
      i += 3;
  }

And nothing has changed on the display?

I can see in the debugger that the data in the frame_buffer have changed, but somehow the HAL_LTDC_SetAddress(&hltdc, frame_buffer, LTDC_LAYER_1); doesn't do anything?

maybe I need to use a different function?

Note: I have tried to configure the LTDC to set the background color, and I still only see the same gibberish?

It seems like the LTDC loads the picture from somewhere but not from the correct place?

0693W000007EwlBQAS.png0693W000007EwkIQAS.png0693W000007EwqfQAC.jpgAny help will be appreciated!

1 REPLY 1
MM..1
Chief II

Seems your LTDC config and init is bad. You need set legal values to cube or reset it in next code , but use ilegal values result to dont working things.

For example on your image you set ltdc layer 0 size 400x400xRGB888 result is chip try read 480kB from start address and your call setaddress do next fail.

Try read MX LTDC Init and understand it. On your image is Address 0 ...

LTDC need config full dimension , but Layer only start X Y and W H equal to framebuffer.

Second special is optimization for circled LCD memory ... Read about LUT