cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F401: how to control a TFT display

FordFairlane
Associate III
Posted on April 08, 2015 at 17:26

Hello everybody, I'm evaluating STM32F401 and other MCU to control a TFT display. There is no need to send pixel data at fixed speed, TFT display has a driver with internal RAM which manages syncs, porchs, pixel clock, etc. MCU has to send images to display, afterwards it can go to sleep. TFT display has 24bit bus width (plus RD, WR, CS...), but only 64K colors are needed, so microcontroller has to send 16 bits/pixel although it is a 24 bits/pixel display. Transfer speed has to be fast to update image display in just some milliseconds. I know STM32F427 is best suited for this application but I need a much cheaper MCU.

I wonder if a DMA channel could be configured to send an image from internal RAM to a 16 bit GPIO, synchronized by a timer that drives WR signal. So the timer drives WR=1 and triggers a DMA transfer, then it drives WR=0 and TFT display reads color data, and so on.

I wonder what will be maximum transfer speed when configuring maximum priority for this DMA channel.

Do you think it will work fine?

Is there a better way to control a TFT with this MCU?

Is there a cheaper (ST) MCU to control a TFT display?

Thank you in advance
6 REPLIES 6
Posted on April 08, 2015 at 17:45

The keyword you are looking for is FSMC.

JW
FordFairlane
Associate III
Posted on April 08, 2015 at 18:00

FSMC is available on 100 pin and up devices, What is the cheapest MCU with FSMC?I'd like to use a 48 pin cheap device like STM32F401CB without FSMC. My budget is 2,5$/MCU max, I'd be happy if ST sells 500K STM32F427 @2.5$/MCU but budget price is 7.5$.

Thank you

FordFairlane
Associate III
Posted on April 08, 2015 at 18:08

I forgot to mention that I need a fast SPI to read images from a flash SPI, STM32F401 has 42Mbps SPI while STM32F1xx has ''only'' 18Mbps SPI.

Posted on April 08, 2015 at 18:38

At 500kpcs, ST - or maybe some other silicon vendor - may want to cook you a custom chip up to your expectations.

You might also consider using a parallel FLASH, if you only need to rapidly transfer data without further processing. That voids the problem of SPI and reduces speed requirements so that maybe even a '51 would do with a help of a couple of 74xx.

The point of '429/'439 is that it has a video controller of its own, i.e. you can use a controller-less display. There is no point to use '427 for the requirements you have presented so far; you can go for '205/'405 (half the clock for '205 and CM3 instead of CM4 core, but the latter really does not matter for sheer data transfer). Probably still not $2.50, but I did not check, I don't care.

As you present your requirements as a moving target, it's hard to tell more. Why don't you get a cheap Nucleo/Discovery board and concoct the solution you presented. It sounds workable and with carefully crafted timing I expect you could get down to some 8 system clocks per cycle or so, until the on-board data last.

JW

FordFairlane
Associate III
Posted on April 09, 2015 at 15:24

I have found another thread where you and other people discuss about controlling a LCD TFT with GPIO and a DMA stream requested by a timer, just the way I thought. Moreover, somebody tried to control the LCD with SDIO (the other way I was thinking about).

SDIO seems to be faster but usafer because SDIO peripheral could insert undesired clock cycles or data.

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https%3a%2f%2fmy%2est%2ecom%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex_mx_stm32%2fMisuse%20SDIO%20interface%20to%20drive%20parallel%208bit%20graphics%20LCD&FolderCTID=0x01200200770978C69A1141439FE559EB45...

Regards

Posted on April 09, 2015 at 21:07

Yeah, I wouldn't hold my breath hoping someone's going to do the design, testing, and due diligence work here. You'll have to invest your time building and testing the efficacy of the ideas.

DMA to GPIO is a well demonstrated concept.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..