cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103C8 using SPI2

hamo
Senior

Hello,

i am trying to interface 1.8 inch SPI TFT Display 128 x 160 to the STM32F103C8 using SPI2.

https://www.az-delivery.de/products/1-8-zoll-spi-tft-display

SPI1 is used for LoRa, i thought to connect TFT too to SPI1 using addresses but i am affraid to influence the

LoRa.

The library which i am using is from this website:
https://controllerstech.com/st7735-1-8-tft-display-with-stm32/

A year earlier i tried to interface LoRa to STM32F103C8 using SPI2 but without success.

Is it a general problem in STM32F103C8 using SPI2?

Any help is appreciated.

65 REPLIES 65
hamo
Senior

I need a driver for the 1.8 TFT ST7735.

I am not sure but it may lay on the driver i am using.

Do you know any?

xisco
Associate III

I'm sorry. My 2 inch 240x320 display works with ST7789 driver.

I think that is not compatible with ST7735.

You could try :  

https://github.com/ScarsFun/STM32F103C8T6_cubeIDE_ST7735_1.8_DMA/tree/master

and again:

If you dont know, how to do ... look on git :

https://github.com/search?q=st7735+stm32f103&type=repositories

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

Thank you all for the support, but i think there is a big problem with the SPI2.
Neither this driver has worked.
The same issue -> HAL_SPI_Transmit() keep stucks.
Idk what to do now.

You have another board/cpu to try ? Just to check, that you not damaged this cpu/spi2 - and it cannot work....

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

Hello,

Is impossible to find an answer when it works on my devices. We can only try other things.

You said in previous messages that the spi2 clk does not work. Have you tested if this pin (PB13) works driving a led, for example? Using it as digital output (not SPI), to be sure that pin is not damaged.

Perhaps HAL_SPI_Transmit() can't transmit due the clock fault.

 

 

 

 

 

hamo
Senior

@xisco 

I have tried PB13 as DIO and the LED blinks normaly

The GPIO B13 is working normaly, so the problem is with the SPI settings i think.

hamo
Senior

I have tried another STM32F103C8T6 -> not working.

Ok, so : your SPI2 not "working" , others (+mine) do ; cpu change -> same , so cpu ok. (except other cpu same damage.)

If same setup (in Cube) , same HAL calls used , but nothing coming out -> your on wrong pin. check again.

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

In your code, did you initialize your display before sending data?

Have you tried if your display works on SPI1?