cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746BGT6 LCD TFT 7'' flickering

Tran Minh Cong
Associate II
Posted on April 02, 2018 at 08:50

Dear every body,

I are using

LCD TFT 7 inch 800x480 

/external-link.jspa?url=https%3A%2F%2Fwww.buydisplay.com%2Fdefault%2F7-tft-lcd-touch-screen-display-module-800x480-for-mp4-gps-tablet-pc

  in our design with STM32F746BTG6 processor working at  200 MHz frequency.

We are using STemWin Library on RTOS operating system

/external-link.jspa?url=https%3A%2F%2Fwww.freertos.org%2F

  with LTDC support.

GUIBuilder.exe software will generate gui data.

I are statically storing the required ARGB format in external SDRAM.

The data is loaded from SDRAM to LTDC (STM32F7 LCD Controller)

using DMA2D and FMC interface

(Flexible Memory Controller – Working at 200/2 MHz).

Timing LCD TFT 7 inch from datasheet:

/external-link.jspa?url=http%3A%2F%2Fwww.buydisplay.com%2Fdownload%2Fic%2FOTA7001A.pdf

 0690X0000060AMkQAM.png

 About frequency in system:

- SDRAM: 100MHz, use same bus data 16bit with other device. Examples:nor flash.

/* Timing configuration for 100Mhz as SD clock frequency (System clock is up to 200Mhz) */

Timing.LoadToActiveDelay = 2;

Timing.ExitSelfRefreshDelay = 7;

Timing.SelfRefreshTime = 4;

Timing.RowCycleDelay = 7;

Timing.WriteRecoveryTime = 2;

Timing.RPDelay = 2;

Timing.RCDDelay = 2;

sdramHandle.Init.SDBank = FMC_SDRAM_BANK1;

sdramHandle.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_9;

sdramHandle.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_13;

sdramHandle.Init.MemoryDataWidth = SDRAM_MEMORY_WIDTH;

sdramHandle.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4;

sdramHandle.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_2;

sdramHandle.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE;

sdramHandle.Init.SDClockPeriod = SDCLOCK_PERIOD;

sdramHandle.Init.ReadBurst = FMC_SDRAM_RBURST_ENABLE;

sdramHandle.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_0;

- LTDC: 19.2 MHz.

PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LTDC;

PeriphClkInitStruct.PLLSAI.PLLSAIN = 192;

PeriphClkInitStruct.PLLSAI.PLLSAIR = 5;

PeriphClkInitStruct.PLLSAIDivR = 2;

HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);

While I'm getting data in norflash, LCD have prolems is flickering.

I know that LTDC will gennerate data to LCD automatically after SDRAM refresh, isn't it?

What is solution to hold data on LTDC while other device use bus data of SDRAM (16 bit data)?

Can you tell me solutions to fix that bug, please?

Thank you so much!

null
22 REPLIES 22
Posted on April 06, 2018 at 12:57

Hi

Cong.Tran_Minh

,

Please check the following: A cache clean is required if DMA source or destination buffers are located in cache-able regions of memory.You may find some more hints in

http://www.st.com/content/ccc/resource/technical/document/application_note/group0/08/dd/25/9c/4d/83/43/12/DM00272913/files/DM002729pdf/jcr:content/translations/en.DM002729pdf

.

The

http://www.st.com/content/ccc/resource/technical/document/application_note/group0/bc/2d/f7/bd/fb/3f/48/47/DM00272912/files/DM002729pdf/jcr:content/translations/en.DM002729pdf

Application note Managing memory protection unit (MPU) in STM32 MCUs withdetailed example of setting up the MPU.

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Tran Minh Cong
Associate II
Posted on April 15, 2018 at 11:11

Dear every body,

I want ask you some question:

1. When i using FMC write/read data to SDRAM/SRAM/Norflash, how do i check write/read done true?

2. 

The data (which is dislay on LCD TFT)  is loaded from SDRAM to LTDC

using DMA2D and FMC interface

(Flexible Memory Controller ).

When SDRAM refresh, LTDC automatically to get data from SDRAM, how control 

SDRAM refresh to accommodate, smooth?

Thank you so much!

Posted on April 16, 2018 at 01:35

1. Are you using DMA to transfer the block ? then you must check the DMA is complete.

You should read back the transfer and compare the data set is what you sent, only a couple of times until it works 100%.

2. I never used the onboard LCD functions, I considered it too much CPU load, my LCDs are external.

But there is a trick, if you want to try it..

if you look closely at the Auto Refresh function inside the SDRAM, it is a column refresh.

you can turn off the auto Refresh and do your own column refresh during the back-Front porch time.

this will then stop the SDRAM Autorefresh interrupting your program's screen refresh.