Only white screen with STM32 Nucleo-64 L467RG + Waveshare 4" ILI9486 + TFT_eSPI <SOLVED>

@Kevin_tsvg, @david_prentice, Hi,

I don't have the same Waveshare display, but I have the original version with RPi connector.
This was one of my first TFT displays with SPI. I have several proto boards for it on different processors (Arduino Due, Wemos D1 R2).

I just connected the one with Wemos D1 R2 to see if it is programmed. Result:

GxCTRL_ILI9486 Test on GxIO_SPI
tft.init() done
reg(0x0000) 0F 80	ID: ILI9320, ILI9325, ILI9335, ...
reg(0x0004) 8C 0F 80 0F	Manufacturer ID
reg(0x0009) 40 0F 80 0F 80	Status Register
reg(0x00BF) E0 0F 80 0F 80 0F	ILI9481, HX8357-B
reg(0x00D3) 00 0F 80 0F	ILI9341, ILI9488
reg(0x00C8) 80 0F 80 0F 80 0F 80 0F 80 0F 80 0F 80	GAMMA
reg(0x00E0) FC 80 0F 0F 80 80 0F 0F 80 80 0F 0F 80 80 0F 0F	GAMMA-P
reg(0x00E1) FC 0F 80 0F 80 0F 80 0F 80 0F 80 0F 80 0F 80 0F	GAMMA-N
reg(0x000A) 1C 0F	Get Power Mode
reg(0x000C) A0 0F	Get Pixel Format
reg(0x0061) FC 0F	RDID1 HX8347-G
reg(0x0062) E0 0F	RDID2 HX8347-G
reg(0x0063) E0 0F	RDID3 HX8347-G
reg(0x0064) FC 0F	RDID1 HX8347-A
reg(0x0065) FC 0F	RDID2 HX8347-A
reg(0x0066) E0 0F	RDID3 HX8347-A
reg(0x0067) 00 0F	RDID Himax HX8347-A
reg(0x0070) FC 80	Panel Himax HX8347-A
reg(0x00A1) 40 0F 80 0F 80	RD_DDB SSD1963
reg(0x00B0) FC 0F	RGB Interface Signal Control
reg(0x00B4) 00 0F	Inversion Control
reg(0x00B6) 80 0F 80 0F 80	Display Control
reg(0x00B7) 00 0F	Entry Mode Set
reg(0x00BF) E0 0F 80 0F 80 0F	ILI9481, HX8357-B
reg(0x00C0) FC 80 0F 0F 80 80 0F 0F 80	Panel Control
reg(0x00C8) 9C 0F 80 0F 80 0F 80 0F 80 0F 80 0F 80	GAMMA
reg(0x00CC) BC 0F	Panel Control
reg(0x00D0) 00 0F 80	Power Control
reg(0x00D2) 40 0F 80 0F 80	NVM Read
reg(0x00D3) 7C 0F 80 0F	ILI9341, ILI9488
reg(0x00DA) 00 0F	RDID1
reg(0x00DB) 00 0F	RDID2
reg(0x00DC) 00 0F	RDID3
reg(0x00E0) FC 80 0F 0F 80 80 0F 0F 80 80 0F 0F 80 80 0F 0F	GAMMA-P
reg(0x00E1) FC 0F 80 0F 80 0F 80 0F 80 0F 80 0F 80 0F 80 0F	GAMMA-N
reg(0x00EF) 00 0F 80 0F 80 0F	ILI9327
reg(0x00F2) FC 0F 80 0F 80 0F 80 0F 80 0F 80 0F	Adjust Control 2
reg(0x00F6) C0 0F 80 0F	Interface Control
 0xF80 0xF80 0xF80 0xF80
 0xF80 0xF80 0xF80 0xF80
 0xF80 0xF80 0xF80 0xF80
 0xF80 0xF80 0xF80 0xF80
Benchmark                Time (microseconds)
Screen fill              783706
Text                     165663
Lines                    1786984
Horiz/Vert Lines         94666
Rectangles (outline)     51626
Rectangles (filled)      1912220
Circles (filled)         1027714
Circles (outline)        1615972
Triangles (outline)      354630
Triangles (filled)       1151752
Rounded rects (outline)  476016
Rounded rects (filled)   2452687
Done!

Of course only garbage on read with the "SPI abortion" circuit.

I do have a Nucleo-64 L467RG. I would not use this combination usually, as I would expect bad performance. But I may try this later, and report.

Arduino SPI support on STM32 should be improved. There should be an extended common SPI support for all Arduino platforms, a common (pure virtual) SPIBaseClass. This would make life easier.

Jean-Marc