#define GxIO_SPI_defaultFrequency 16000000
The values above are for 16MHz, or whatever the platform does when setting speed to 16MHz.
Note that GxTFT is not optimized for SPI in any way. My other libraries are not optimized for SPI on processors other than ESP8266 and ESP32.
The common SPI method of all Arduino SPIClass implementations is transfer, which does a read cycle after write, thus effectively halves the possible SPI speed. But transaction and setting handling makes performance even worse on most platforms.
I think I will do some experiments with this today.
Jean-Marc
Update:
ILI9486 TFTs with the "SPI abortion" connection can't be used with GxTFT on STM32.
GxTFT uses separate transactions for commands and for command parameters with ILI9486.
This works on ESP32 and ESP8266 that have SPI write only methods.
Instead 16bit SPI writes or transfers should be used for commands and command parameters.
Therefore I could not measure times on this display with GxTFT on STM32.
My newer library GFX_TFT can be used with this display on STM32 (after a small fix in the example GFX_SPI_TFT_graphicstest.
Screen update times are slow on STM32 with this display
On NUCLEO-F103RB:
setup
init
tft.init() done
Benchmark Time (microseconds)
Screen fill 7294376
Text 231436
Lines 4452662
Horiz/Vert Lines 601252
Rectangles (outline) 335630
Rectangles (filled) 17780439
Circles (filled) 1876628
Circles (outline) 1916514
Triangles (outline) 879881
Triangles (filled) 5767085
Rounded rects (outline) 765181
Rounded rects (filled) 17687714
Done!
On NUCLEO-L476RG:
setup
init
tft.init() done
Benchmark Time (microseconds)
Screen fill 4419745
Text 156403
Lines 2991922
Horiz/Vert Lines 366333
Rectangles (outline) 205150
Rectangles (filled) 10773318
Circles (filled) 1197440
Circles (outline) 1292403
Triangles (outline) 588440
Triangles (filled) 3533791
Rounded rects (outline) 503728
Rounded rects (filled) 10734157
Done!
Both using 20MHz SPI speed.
On NUCLEO-L476RG with SPIsettings parameter SPI_TRANSMITONLY:
setup
init
tft.init() done
Benchmark Time (microseconds)
Screen fill 3459240
Text 118535
Lines 2185208
Horiz/Vert Lines 287315
Rectangles (outline) 160374
Rectangles (filled) 8431935
Circles (filled) 920642
Circles (outline) 947017
Triangles (outline) 431914
Triangles (filled) 2754028
Rounded rects (outline) 377938
Rounded rects (filled) 8396692
Done!