2019-08-28 07:07 PM
Hi:
I have an spi TFT screen,and how to port the TouchGFX on this Sreen?
Thanks!!
Solved! Go to Solution.
2019-09-09 12:09 AM
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
2019-08-29 01:10 AM
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
2019-08-29 01:15 AM
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.
2019-08-29 05:49 PM
Hi Martin:
Thank you so much.l am tring to use it in my program.
Best regards!
Jack li
2019-08-29 05:49 PM
Hi Martin:
Thank you so much.l am tring to use it in my program.
Best regards!
Jack li
2019-08-30 12:39 AM
No problem! Looking forward to hearing about it :)
/Martin
2019-09-06 10:59 AM
Hi Martin@Martin KJELDSEN :
How to use it without DMA2D?And I can't understand how to use HAL::flushFrameBuffer(r); in my project.@Martin KJELDSEN
#define HAL_CLASS_TYPE MyHAL
HAL& hal = touchgfx_generic_init<HAL_CLASS_TYPE>(dma, display, tc, GUI_DISPLAY_WIDTH, GUI_DISPLAY_HEIGHT, (uint16_t*)dynBitmapsBuffer, DYN_SIZE, MAX_DYN_COVERS);
Is this the right way to use it?I use HAL_SPI_Transmit_DMA(&hspi1, (uint8_t *)pimage, 240*240) to send image,so can I use thisway to send farmbuffer
to screen?
Best regards!
Jack li
2019-09-06 11:24 PM
Hi Martin@Martin KJELDSEN (ST Employee) :
How should I solve it?????Thanks very much !!!!!!
Best regards!
Jack li
2019-09-09 12:09 AM
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
2019-09-23 07:47 PM
Hi Martin:
Thanks your help! It can display on TFT by touchgfx.
Best regards!
Jack li