2020-12-31 01:30 AM
Hello,
I'm using STM32H745XI based custom board running at 480MHz.
Interfaced SDRAM in 32 bit mode.
Using RGB 24 -bit interface to connect to TFT Displays.
Setup Emwin in ARGB8888 Mode.
Functional memory map is like below.
LTDC Configured as Single layer 800x480 Display.
Frame buffer in sdram [ Using 2 Buffers in Emwin].
Emwin objects data are in AXI RAM at 0x30000000 for 256 Kb
Using FreeRTOS so configured stack and heaps in DTCM ram.
Placed Vector table and ISR routines in ITCM ram.
Configured MPU for 2 Regions.
0x30040000 - 64Kb [ Share,No-cache,No-Buffer,MPU_INSTRUCTION_ACCESS_ENABLE,TEX0 ]
0xC0000000 - 16Mb [ No-Share,Cache,Buffer,MPU_INSTRUCTION_ACCESS_DISABLE,TEX0 ]
Works fine but sometimes it genereates FIFO Underrun error HAL_LTDC_ERROR_FU Error And Program stucks.
How to troubleshoot this issue.
Do i need to configure any other MPU regions.
Any clue will be helpful.
Thanks.
2020-12-31 04:03 AM
try slow down LTDC clock
2020-12-31 09:28 PM
LTDC Clock was running at 40 MHz.
My TFT Requires typical 40 MHz Dot Clock.
Here is my TFT Timing.Here is the timing values i've programmed.
#define VSYNC 3
#define VBP 29
#define VFP 13
#define VACT 480
#define HSYNC 48
#define HBP 40
#define HFP 40
#define HACT 800
hltdc.Init.HorizontalSync = (HSYNC - 1);
hltdc.Init.VerticalSync = (VSYNC - 1);
hltdc.Init.AccumulatedHBP = (HSYNC + HBP - 1);
hltdc.Init.AccumulatedVBP = (VSYNC + VBP - 1);
hltdc.Init.AccumulatedActiveH = (VSYNC + VBP + VACT - 1);
hltdc.Init.AccumulatedActiveW = (HSYNC + HBP + HACT - 1);
hltdc.Init.TotalHeigh = (VSYNC + VBP + VACT + VFP - 1);
hltdc.Init.TotalWidth = (HSYNC + HBP + HACT + HFP - 1);
/* background value */
hltdc.Init.Backcolor.Blue = 0;
hltdc.Init.Backcolor.Green = 0;
hltdc.Init.Backcolor.Red = 0;
/* Polarity */
hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL;
hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL;
hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AL;
hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
hltdc.Instance = LTDC;
HAL_LTDC_Init(&hltdc);
HAL_LTDC_ProgramLineEvent(&hltdc, 0);
Is there anything that i can try?
2021-01-01 01:47 AM
No your LCD define only MAX and TYPICAL and no MINIMAL value, you can use any freq up to 50, but
speed need corelate with MCU. Then try slow down LTDC clock for example -5%. 8)
2021-01-01 10:18 PM
Reduced LTDC Clock frequency to 30 MHz Still gettings the same problem.
Although Frequency of flickering reduced so will try reducing LTDC Clock further.
2021-01-01 10:30 PM
Might also want to look critically at the SDRAM timing, whether that is cached/buffered, and what kind of contention you have on it.
2021-01-02 01:27 AM
Memory and bus configure to maximum throug and too try place Frame buffer in sdram [ Using 2 Buffers in Emwin]
starting address to bank start addresses example first buf C0000000 second C0200000 when your bank start here...
2021-12-08 10:36 PM
@JPate.2 We are in the same boat. Did you find any resolution for the problem?
@MM..1 @Community member Can we increase the clock speed of SDRAM to avoid this issue?