Nucleo-F030R8 and ILI9341 Changing SPI Speed

Post here first, or if you can't find a relevant section!
Post Reply
GeorgeIoak
Posts: 39
Joined: Sun Jun 07, 2020 2:01 am

Nucleo-F030R8 and ILI9341 Changing SPI Speed

Post by GeorgeIoak »

I'm using the Official Core and Adafruit's ILI9341 driver. Looking at their code I'm supposed to be able to pass in the SPI frequency like this:

Code: Select all

tft.begin(36000000);
but I've tried 32MHz and 36MHz yet on the scope I'm always seeing 24MHz.

Is there a different way to change the SPI frequency?

stas2z
Posts: 131
Joined: Mon Feb 24, 2020 8:17 pm
Answers: 8

Re: Nucleo-F030R8 and ILI9341 Changing SPI Speed

Post by stas2z »

No, maximum speed of spi is cpu clock divided by 2

GeorgeIoak
Posts: 39
Joined: Sun Jun 07, 2020 2:01 am

Re: Nucleo-F030R8 and ILI9341 Changing SPI Speed

Post by GeorgeIoak »

Thanks, I figured it had to be something like that but with all the clock settings I couldn't find an easy answer.

Is that true for all of the STM32 series?

The speed isn't too bad for me as this project is just displaying text. I'm using a "nice" font which forces me to wipe the background before updating the text so I'm hoping to try and improve on that.

The STM320F0 is so cost effective but maybe I can raise the budget a little if I have to but the 72MHz STM32F103 is more than 2x the cost of the STM32F030

.rpv
Posts: 28
Joined: Wed Dec 18, 2019 10:19 pm

Re: Nucleo-F030R8 and ILI9341 Changing SPI Speed

Post by .rpv »

Try this library:

https://github.com/Bodmer/TFT_eSPI

I'm using it with and F030C8 and the ST7735 display, on some of my tests I got about 10x better speed than the standard adafruit libraries :D

GeorgeIoak
Posts: 39
Joined: Sun Jun 07, 2020 2:01 am

Re: Nucleo-F030R8 and ILI9341 Changing SPI Speed

Post by GeorgeIoak »

Yeah, I did a little testing with that library when using PlatformIO, maybe I need to go back and revisit it if what you're saying is true. He also recently posted some news about a speed improvement for STM32 and parallel mode. I wanted to try and keep with SPI but if I "have to" I could try that as well since I just bought another 2.8" screen that supports all type of different connections.

GeorgeIoak
Posts: 39
Joined: Sun Jun 07, 2020 2:01 am

Re: Nucleo-F030R8 and ILI9341 Changing SPI Speed

Post by GeorgeIoak »

Just as a follow up, I switched my code to use the TFT_eSPI library and using the same FreeFont my code size increased by ~15k. I have all the fonts defined in my setup file but if I read correctly they aren't loaded unless you call them and I'm only calling 1 font in my code.

I just commented out all the #defines for the fonts in my setup except for LOAD_GFXFF and the code size did drop by ~15k so I guess I read wrong.

I'll have to read up on the font usage as I'd like an 18 point one, something between FONT 4 and FONT 6

Post Reply

Return to “General discussion”