TFT_eSPI: Support added for STM32 processors with SPI DMA

@jxdi
Setup 32 should work OK with the "black pill" board even though the file name and descriptions within implies otherwise. Pins are as listed in the file.

Don't forget to edit the User_Setup_Select.h file to point to that one setup file.

Thanks for the answer David.
Yes you are right.I bought the board from Aliexpress and it is the backpill F411 in the photo you post.
It seems that i did something wrong via my tests.
Now my laptop does not recognise the board.
Is there any way to make it visible? Because i can not even upload anything.
Thanks again.
Yannis

The Official STM32 core has many options to choose in the IDE. Please quote what you are actually using.

The first step is always to upload a sketch, "blink" an LED.

David.

@jxid
I have had problems with loosing the programming connection as well. Not sure why.

I now use a cheap ST-Link-V2 dongle to program the Blue/Black Pill boards and a USB TO UART Converter (FTDI) to monitor the serial I/O pins A9 and A10. For me this has proved to be a very reliable programming method.

There are guides on the web.

bodmer:
@jxid
I have had problems with loosing the programming connection as well. Not sure why.

I now use a cheap ST-Link-V2 dongle to program the Blue/Black Pill boards and a USB TO UART Converter (FTDI) to monitor the serial I/O pins A9 and A10. For me this has proved to be a very reliable programming method.

There are guides on the web.

Thanks for the answer bodmer.
I am using the same methods too after some searching.
Now it works all the time.
I had no time to test the display but as soon as i test it i will post back here.

david_prentice:
The first step is always to upload a sketch, "blink" an LED.

David.

After "recovering" the board i upload the "blink" project and it worked fine.
Thank you.

Thank you both bodmer and David for your help.
I tried the display now.

The "TFT_graphicstest_one_lib" project does not work.(The display is white)

The "TFT_graphicstest_PDQ" project does not work.(The display is white)

The "Free_Fonts_Demo" project works fine.

The "All_Free_Fonts_Demo" project works fine.

The "RLE_Font_test" project works fine.

The "TFT_Pie_Chart" project works fine.

The "TFT_Clock_Digital" project works fine.

The "TFT_Rainbow_one_lib" project works fine.

I uploaded all these projects without ST-LINK dongle or FTDI.

The graphics test programs output to the serial port, make sure this is congigured correctly in the IDE. The stock Arduino ASCII table example is a good sketch to test you have the right serial settings defined.

Well i tried again the graphicstest projects.
I find out that the display works after i open the serial monitor.
If i reboot the board and te serial monitor is not running in my laptop the dispaly is white.
And i tested it many times.
If i start the board the display is white.
When i open and run the serial monitor everything works fine.
Any explanation for this?

Edit: I check the project code.
I just // while(!Serial);
and now the display works fine without to have to open the serial monitor.
Thank you all for your help.
Yannis

david_prentice:
The Official STM32 core has many options to choose in the IDE. Please quote what you are actually using.

You would get accurate replies if you stated which IDE options you have selected.

David.

david_prentice:
You would get accurate replies if you stated which IDE options you have selected.

David.

You are right David.
I will be more careful next time.
Thank you.

Go on. It takes you 5 minutes to simply type your "selections"

Then readers would know !!

OK. Here are my settings in Arduino IDE and connections:

In Arduino IDE:

Board: Generic STM32F4 series
Board part number: Generic F411CE
U(S)ART upport: Enabled(Generic 'Serial')
USB support (if available):CDC (generic 'Serial' supersede U(S)ART)
USB Speed (if available): Low/Full Speed
Optimize: Smallest(-OS Default)
C Runtime Library: Newlib Nano (default)
Upload Methode: STM32CubeProgrammer(DFU)

Connections:

TFT - STM32

VCC - 5V
GND -GND
LED - 3.3V
CS - A0
RST - A2
DC - A1
MISO - A6
MOSI - A7
SCK - A5

Something i want to add.
I tried all the above settings with
Board part number "BlackPill F411CE"
and it worked again with no problem.
This is just to know that "BlackPill F411CE" and "Generic F411CE" as Board part number works the same.

For a while now I have been trying to understand how the SdFat-beta 2 library works in other SPI ports (2, 3 etc) to use it in the GD23ZUTX library (a modified version of the 23X gameduino library that works with SdFat) focused on EVE2 / 3 screens.

I achieved the goal and in the process I remembered the TFT-eSPI library; how I was working on the nucleo-F767 board, I thought if we could put in the top hat: a microSD reader, a 16 Gb microSD, an ILI9341 TFT, the SPI3 bus and the SdFat-beta library...

Initializing SD card...OK!
Loading image 'woof.bmp'
Bit depth: 24, 240x320
Loaded in 853 ms
Loading image '6oBa.bmp'
Bit depth: 24, 240x320
Loaded in 910 ms
Loading image 'Foff.bmp'
Bit depth: 24, 320x240
Loaded in 831 ms
Loading image 'Fon.bmp'
Bit depth: 24, 320x240
Loaded in 792 ms
Loading image 'loc1.bmp'
Bit depth: 24, 320x240
Loaded in 792 ms
Loading image 'angry_16.bmp'
Bit depth: 24, 240x320
Loaded in 850 ms

Bus SPI3 on nucleo-F767: MOSI-PB2, MISO-PB4, SCK-PB3, CS-PB11

SdFat-Beta V2

PD:

For the experts, would it be possible to load * .565 image files like those that can be read in the ILI9341_due library from Marek? or could any performance improvement to be applied using DMA or FIFO?

TFT_eSPI_SdFat_BMP.ino (7.34 KB)

ToMicroSD.zip (987 KB)