cancel
Showing results for 
Search instead for 
Did you mean: 

Driving ST7735 with a F4xx discovery board.

vetalswiss
Associate

hello everyone, I have been trying to display even basic text on my TFT 1.8" Display and am yet to get anything but gibberish. I am using this library to interface with it. https://github.com/afiskon/stm32-st7735   I have followed plenty of tutorials, and I made sure i configured the SPI2 correctly. here is how it is configured. I am using STM32CubeIDE.

 

hspi2.Instance = SPI2;

hspi2.Init.Mode = SPI_MODE_MASTER;

hspi2.Init.Direction = SPI_DIRECTION_2LINES;

hspi2.Init.DataSize = SPI_DATASIZE_8BIT;

hspi2.Init.CLKPolarity = SPI_POLARITY_LOW;

hspi2.Init.CLKPhase = SPI_PHASE_1EDGE;

hspi2.Init.NSS = SPI_NSS_SOFT;

hspi2.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_32;

hspi2.Init.FirstBit = SPI_FIRSTBIT_MSB;

hspi2.Init.TIMode = SPI_TIMODE_DISABLE;

hspi2.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;

hspi2.Init.CRCPolynomial = 10;

if (HAL_SPI_Init(&hspi2) != HAL_OK)

{

Error_Handler();

}

 

Is there something people commonly miss, or something I should check? I'm at my wits end. Please let me know if I should link anything else.

1 REPLY 1
AScha.3
Chief II

Hi,

here my spi setting for ST7735 TFT :

 

AScha3_0-1714404540737.png

What kind of TFT you have ? (I have green tab version.)

Is init ok ? TFT cls -> black screen ok ?

If you feel a post has answered your question, please click "Accept as Solution".