Can you do STM32 TFT on internal SRAM for the framebuffer? - Page 1
Forum section: electronics / general

author: alank2
author_rank: Super Contributor
timestamp: June 22, 2017, 01:03:32 pm
content: I noticed that some STM32's have a TFT controller, but their STM32F746G-DISCO comes with sdram presumably for the frame buffer. With a smaller TFT like 480x272, it is feasable/possible to avoid external memory and run the frame buffer in sram? What is the lowest bpp you can do? Do you need two framebuffers, one for what is displayed and one being modified?

author: bktemp
author_rank: Super Contributor
timestamp: June 22, 2017, 01:54:25 pm
content: The lowest number of colours is 8bit using either grayscale or a LUT for 256 out of 16.7M colours. For 480x272 that gives a memory requirement of 127.5kBytes. That should fit in internal memory.You don't need doublebuffering if you don't care about image changes being visible on the display.

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 02:09:56 pm
content: Quote from: alank2 on June 22, 2017, 01:03:32 pmThe SDRAM is general purpose RAM and works for any purpose. (You can use it for uCLinux if you want to...) Extra RAM does help with the framebuffer though.Quote from: alank2 on June 22, 2017, 01:03:32 pmYou got at most 20 bits per pixel. So for 16bpp RGB565 or 8bpp indexed it is probably okay. But if you want to step it up to 24bpp RGB888 even 32bpp ARGB8888 format you will need the extra RAM.Quote from: alank2 on June 22, 2017, 01:03:32 pmTwo framebuffers does make animations a lot smoother - construct the frame while it is not shown, and always show the finished image without touching it again.

author: alank2
author_rank: Super Contributor
timestamp: June 22, 2017, 02:17:02 pm
content: Thanks--do you guys think the STM32F746G-DISCO is a good thing to get started with STM32/TFT or is there something better?

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 02:25:09 pm
content: Quote from: alank2 on June 22, 2017, 02:17:02 pmI think it is one of the best out there - I am still playing with STM32F407ZG with 1MB external SRAM and 16MB external Flash for this.Speaking of, if you have a lot of static images you can just get the graphics controller to load the image directly from built-in Flash or the external QSPI Flash.

author: newbrain
author_rank: Super Contributor
timestamp: June 22, 2017, 02:34:12 pm
content: It's possible to use the internal DMA2d "Chrom-Art Acceletor" with a Colour Look Up Table (CLUT) down to 4 bits per pixel, giving 480x272x4/8=65280 bytes for 16 selectable colours (in L4 mode) or 2 colors with Alpha (in A4 mode).This, given the 320kB (+change) on a 746NG gives some elbow room also for double buffering, but using the internal RAM controller is no problem, if you get the Disco.The 746 Disco is definitely an interesting board (I've got two, but one was complimentary), though it might pack more stuff than what you are looking for: the external connectivity is a bit limited by the number of IOs used for onboard peripherals.Check the revision of the processor and the relevant errata. I got mine with one of the early masks (and longish errata).The display mode is fixed: only RGB interface can used, no SPI or bus mode, in case you were interested.You can also follow anonline MOOCon the ST site that uses it. IIRC, the goal of the exercises its to design a (toy) scope.A cheaper alternative could be the 429 Disco, with its much smaller display (can be set to all the supported modes).