STM32 and ST7735 1.8 TFT LCD display

preview_player
Показать описание
Showing how to get fast SPI transfer and optimized algorithm handling the ST7735 display driver.
Speeding up dat transfer from 100ms to less than 7ms per a full screen frame, from more than 1ms to less than 150ns per character written over the display, from 200 to 52 ns per line drawing.

00:00 intro: summary
01:28 intro: selecting the display for a project
02:26 intro: downloading a sw library for STM32
04:25 setup a performance test for the sw library
06:09 moving sw library from polling mode to DMA and interrupt and testing it
10:53 measuring SPI data transfer via a digital logic analyzer
14:27 a plan to opimize data flow and drawing algorithm
17:47 why a need for a double data buffer?
19:42 first tests with the logic analzer after sw improvement
20:52 polling mode or DMA? Use them BOTH!
22:47 final considerations: which SPI baud rate for the ST7735 driver?
23:52 final considerations: sizing the display buffer
25:14 final considerations: dimming backlight
26:00 final considerations: moving to STM fonts

Documentation:

Рекомендации по теме
Комментарии
Автор

Errata corrige: time 07:19
As the variable is modified by an interrupt callback, that must be "volatile".
So, as you can see on github, the right declaration is "static volatile uint8_t ..."
I forgot it while registering

bluewat
Автор

Errata corrige: time 05:45
Here and somewhere else in the video you see the total page of the "original" library showing "20 screens". it is 50.
Initially it was 20, when I decided to review library I changed to 50 in order to have the four tests of nearly the same time on original library.
As you can see I forgot updating description in the total page.
It is 50 screens: 100ms per screen.

bluewat
Автор

Bardzo dobre wideo, super tłumaczy jak przyspieszyć działanie wyświetlacza LCD.

RafałNowak-rx
Автор

Impressive work, the next stage of code optimization for stm 32 is to use the CMSIS library. Thank you for the inspiration.

ВладДубровский-ъж
Автор

Fantastico. Sto cercando la miglior video series per imparare graphics with STM32 e credo proprio che seguirò i tuoi video. Grazie mille!

mohrusc
Автор

Ciao Mauro, tantissimi complimenti per i tuoi video: veramente molto belli. Angelo

angelostella
Автор

I tested it works fine. Congratulations 👏

ramazanacar
Автор

Very nice library. Running on F103C8T6 and Nucleo-F411RE. ECCELLENTE! thanks.

nohokum
Автор

Hi @bluewat, Thank you for this wonderful training, had a lot of insights on how to design the display, this was really helpful. Only one query is there any tool in specific to generate the fonts for this display

ParthasarathyPM
Автор

It is a great contribution, thank you very much, could you give me information about displaying images?

deutrion
Автор

Hello, All your optimization ideas are great, especially the mix of SPI modes and buffer. I'm trying to get away from the HAL_SPI_Transmit function in polling mode and do something like this:
void ST7735_WriteData(uint8_t* buff, size_t buff_size)
{
TFT_DC_D();
for(uint8_t i=0;i<buff_size;i++)
{
while (!(SPI1->SR & SPI_SR_TXE)){}
SPI1->DR = buff[i];
}
while ((SPI1->SR & SPI_SR_BSY));
And of course:
void ST7735_WriteCommand(uint8_t cmd)
{
TFT_DC_C();
while (!(SPI1->SR & SPI_SR_TXE));
SPI1->DR = cmd;
while ((SPI1->SR & SPI_SR_BSY));
Too bad I don't have an analyzer...

ВладДубровский-ъж