Skip to main content
Jack li1
Associate III
August 29, 2019
Solved

How to use TouchGFX on SPI TFT Sreen?

  • August 29, 2019
  • 5 replies
  • 2883 views

Hi:

I have an spi TFT screen,and how to port the TouchGFX on this Sreen?

Thanks!!

This topic has been closed for replies.
Best answer by Martin KJELDSEN

DMA2D is only used for graphics (by TouchGFX). I don't know how you want to implement your driver or if you have one already, but here you'd use one of the "regular" DMA channels to do your transfer to the screen. Are you trying to develop a driver from scratch?

/Martin

5 replies

Martin KJELDSEN
Principal III
August 29, 2019

https://touchgfx.zendesk.com/hc/en-us/articles/203642951-MCUs-without-TFT-controller

You'll find that, when you don't have an LTDC to clock out pixels for you, you'll implement a transfer of the framebuffer (or parts of it) to your SPI display in a particular method called after a frame has been rendered.

void HAL::flushFrameBuffer();
void HAL::flushFrameBuffer(Rect& r);

/Martin

Martin KJELDSEN
Principal III
August 29, 2019

So the port will consist of you creating your own HAL that overrides flushFrameBuffer. E.g.

void MyHAL::flushFrameBuffer(Rect& r)
{
 HAL::flushFrameBuffer(r);
 
 //Use own drivers to transfer data
 ...
 
 //If using DMA to transfer data you'll need an additional semaphore released by your DMA 
 // TX completed handler. This overrided flush method should try to take that semaphore so it doesn't return 
 // before DMA transfer has been completed. 
 
}

Give the article a read and let me know.

Jack li1
Jack li1Author
Associate III
August 30, 2019

Hi Martin:

Thank you so much.l am tring to use it in my program.

Best regards!

Jack li

Jack li1
Jack li1Author
Associate III
August 30, 2019

Hi Martin:

Thank you so much.l am tring to use it in my program.

Best regards!

Jack li

Jack li1
Jack li1Author
Associate III
September 24, 2019

Hi Martin:

Thanks your help! It can display on TFT by touchgfx.

Best regards!

Jack li

Martin KJELDSEN
Principal III
September 24, 2019

That's great, @Jack li​!

/Martin

KR51K
Associate III
April 9, 2020

Hello, would you share your solution?

Best regards!