Nucleo H743ZI + NHD FT813 3.5"

Working libraries, libraries being ported and related hardware
Post Reply
TFTLCDCyg
Posts: 26
Joined: Tue Jan 07, 2020 9:50 pm
Answers: 1

Nucleo H743ZI + NHD FT813 3.5"

Post by TFTLCDCyg »

After a couple of years with the H743ZI core board in a drawer collecting dust, we finally managed to use it to connect a 3.5 "FT813 screen in SPI1 and in SPI3 a microSD reader for multimedia handling.

The Greiman SdFat library can work in core 1.8.0, so we have used it to manage multimedia files (jpg, png, assets, cells and avi videos with audio) from the microSD reader installed in SPI3.

We modify the library for gameduino 23x, so that it works with Greiman's SdFat library, we name this library as GD23ZU. It is a work in progress ...

Image
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Nucleo H743ZI + NHD FT813 3.5"

Post by fpiSTM »

Great. Thanks for sharing.
TFTLCDCyg
Posts: 26
Joined: Tue Jan 07, 2020 9:50 pm
Answers: 1

Re: Nucleo H743ZI + NHD FT813 3.5"

Post by TFTLCDCyg »

These are the modified variants with SPI3 active and some extra working frequency

In some days we will have the Github repository online, with the modified library GD23ZU. We will gladly share the link in case someone wants to experiment with these FT81x TFT's

In order to gain access to the SdFat library on the nucleo boards, we must modify this line in the file: SdFatConfig.h

Code: Select all

/**
 * If the symbol USE_STANDARD_SPI_LIBRARY is zero, an optimized custom SPI
 * driver is used if it exists.  If the symbol USE_STANDARD_SPI_LIBRARY is
 * one, the standard Arduino SPI.h library is used with SPI. If the symbol
 * USE_STANDARD_SPI_LIBRARY is two, the SPI port can be selected with the
 * constructors SdFat(SPIClass* spiPort) and SdFatEX(SPIClass* spiPort).
 */
#define USE_STANDARD_SPI_LIBRARY 0
This is the setting we must have:

Code: Select all

/**
 * If the symbol USE_STANDARD_SPI_LIBRARY is zero, an optimized custom SPI
 * driver is used if it exists.  If the symbol USE_STANDARD_SPI_LIBRARY is
 * one, the standard Arduino SPI.h library is used with SPI. If the symbol
 * USE_STANDARD_SPI_LIBRARY is two, the SPI port can be selected with the
 * constructors SdFat(SPIClass* spiPort) and SdFatEX(SPIClass* spiPort).
 */
#define USE_STANDARD_SPI_LIBRARY 2
This is the constructor that we must use in any call to the SdFat library, to access the SPI3 bus (nucleo F767ZI or nucleo H743ZI):

Code: Select all

#define SD_PIN        PB11
SPIClass SPI_3(PB2, PB4, PB3); 
SdFat SD(&SPI_3);
To end the data transfer on the SPI3 bus and avoid any subsequent communication error, we must use this line:

Code: Select all

SPI_3.endTransaction(SD_PIN);
We need to investigate how DMA could be used on these boards, in order to improve the communication speed in the SdFat library. Knowledge is somewhat limited, some support could be useful.

Perhaps some expert will guide us how we can use this part of the STM32 nucleo boards, to incorporate it into the GD23ZU library.
Post Reply

Return to “Libraries & Hardware”