2024-02-08 12:32 PM
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.
Solved! Go to Solution.
2024-02-15 04:22 AM
Where is no clock ?
2024-02-15 04:43 AM
After changing the code and uploading it on the bluepill, i use logic analyzer to see if it works.
There is no clock on the pin PB13 -> not toggling at all.
2024-02-15 05:26 AM - edited 2024-02-15 05:57 AM
Cannot be ... :flushed_face:
Show what you set in Cube to SPI2 . we looked already.
Try debug - on HAL_SPI_Transmit(...) : what it doing ???
2024-02-15 11:40 AM
I ahve done it.
after initialiying it tries to send the data and waits for the TXE flag to be set so it can send data.
But it keeps wait then goes to timeout.
With the help of logic analzyer i see there is no clock.
2024-02-15 11:51 AM
Read out and check/post content of SPI and relevant GPIO/AFIO registers.
JW
2024-02-15 11:57 AM - edited 2024-02-15 12:02 PM
ok - just : you use cubeIDE - right ? nothing special doing .... ?
Because i set it in CubeMX, then generate code, then write to spi (HAL_... ) -- and it works.
So you must do something different...but i have no idea, what it could be.
ed
maybe i seen..
you set : half duplex master .
try:
2024-02-15 10:09 PM
@AScha.3 thanks
I will try that but i am using Keil IDE and not STM32CubeIDE.
I tries to use STM21CubeIDE, but it couldn't upload the code to the MCU.
2024-02-16 11:25 AM
Ok, and how?
2024-02-16 12:02 PM
CS ist low -> correct.
I have tried transmit only master -> no
The problem is -> NO CLOCK.
NO CLOCK -> WILL NOT WORK.
2024-02-16 12:40 PM
>I tries to use STM21CubeIDE, but it couldn't upload the code to the MCU.
Why ? wrong debug setting ?