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-13 05:34 AM
Hello @waclawek.jan
i have used logic analyzer and figured out that there is no clock.
Here is a capture of the SPI2:
The only toggle is when i reset the bluepill.
2024-02-13 06:34 AM
What code is this?
Have you got a basic SPI example working on SPI2?
2024-02-13 06:40 AM
This code is to make ST7735 TFT work.
Which example do you mean?
2024-02-13 06:52 AM - edited 2024-02-13 06:55 AM
You just need the simplest SPI example you can find - one which does just SPI and nothing else.
You need to get the basic comms working before adding complications like a TFT display!
Otherwise you won't know if the problems are with the SPI itself, or elsewhere in all the mountains of other code.
ST publishes basic peripheral examples; eg, in the Cube IDE ...
EDIT:
https://www.st.com/en/embedded-software/stm32cubef1.html
2024-02-13 06:53 AM - edited 2024-02-13 07:08 AM
Yes - i have just now a small 2,2" TFT on SPI2 running, on a "blue pill" board.
How you set the spi2 in Cube ? ed , ok i seen it.
I have it at 18Mbit...and using CubeIDE .
->
2024-02-13 07:22 AM
@AScha.3 thanks for for your reply.
can you please share your STM32CubeMX settings?
@Andrew Neil thanks, i will do that surely
2024-02-13 07:29 AM
My spi2 setting: (+ pin speed: high )
2024-02-13 11:31 AM
2024-02-13 11:36 AM
Yes , core at 72 M.
CS.. are just any I/O pins, that are close (for wiring...i hate, to have a wire cross the board. :) )
2024-02-13 11:51 AM
@AScha.3 i have just tried this settings and compiled the code and uploaded, it stills not working for me.
I used the logic analyzer -> all the pins (SPI2) are not toggling.