STM32F401 and ILI9488 on alternative SPI #1175
Gerald83
started this conversation in
Compatible displays and setup files
Replies: 2 comments 2 replies
-
The library creates a new SPI class instance so SPI.Xxxxxx() will be calling the default Arduino SPI class instance, not the one created by TFT_eSPI library. You can obtain the instance used by TFT_eSPI by using the class instance returned by tft.getSPIinstance() |
Beta Was this translation helpful? Give feedback.
0 replies
-
An alternative is to not define the TFT MOSI, MISO and SCLK pins in the setup file, then the default SPI instance is used, see here. Then SPI.setMISO(PB5); etc will probably work. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm new in STM32 and ILI9488 displays use.
I'm using an STM32F401 black pill with 3.5 touch display ILI9488 V1.0 board with XPT2046 touch controler.
I manage to use it succesfully on SPI1 and SPI2 natives pins, but I'd like to use it on SPI1 alternate pins : MOSI - PB5, MISO -PB4 and SCK - PB3 for my project in order to keep highest spi speed.
I've tried directly to chang pn assignement in the Setup32_ILI9341_STM32F103.h
#define TFT_SPI_PORT 1 // SPI port 1 maximum clock rate is 55MHz
#define TFT_MOSI PB5 //PA7
#define TFT_MISO PB4 //PA6
#define TFT_SCLK PB3 //PA5
but it does not work.
I've try to had in setup() (before tft.begin() as mentioned in the stm32duino wiki)
SPI.setMISO(PB5);
SPI.setMOSI(PB4);
SPI.setSCLK(PB3);
SPI.setSSEL(PA15);
SPI.begin(2);
This does not work anymore...
I'm certainly missing something, but I don't see what!
Thanks a lot for your help.
Beta Was this translation helpful? Give feedback.
All reactions