Increasing the speed of LCD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-09 10:12 AM
I have interfaced an Arduino 2.4" 320x240 LCD display with an ILI9341 controller to an STM32L476 MCU. To do this I stitched together the ST initialization code derived from MX plus some LCD initialization code from LCDwiki plus a font library from Texas Inst. I replaced the SPI driver in the TI part of the code with a native ST driver and it all works well. BUT it is slow. It takes 1.6 sec to write the entire 60,000 pixels because the message is going out one byte at a time with a 12 usec latency between each byte. (two bytes/pixel)
The HAL driver HAL_SPI_Transmit(&SpiHandle, (uint8_t*)aTxBuffer, 50, 5000) works well, with no latency, when transmitting a string but the TI font interpreter generates only one byte at a time so.. where do I go from here? I suppose I could create a 120 kbyte buffer in RAM and call the above HAL function but I think that's kind of brute force. Any suggestions would be gratefully appreciated.
- Labels:
-
LCD-LTDC
-
SPI
-
STM32L4 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-09 10:59 AM
TouchGFX?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-09 11:04 AM
>>.. when transmitting a string but the TI font interpreter generates only one byte at a time so.. where do I go from here?
Refactor the code or buffer it so it's more efficient or generates longer runs of data.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-09 11:11 AM
Tesla--
That seems to be the answer doesn't it. I was hoping for a magic fix to eliminate the latency since I don't know where it's coming from. Refactoring the TI code sounds like about a week of work. Thanks-Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-09 11:34 AM
The usual method is to create a screen buffer in memory that can be sent out quickly over SPI using DMA, then make your modification to this buffer. Creating two buffers allows you to ensure changes to the display take place all at once.
No doubt TouchGFX could be used here if you want to look into it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-09 9:50 PM
Thank you TDK. I think the buffer approach is good but it's going to require a bit of experimenting. I'll look into TouchGFX also
