Page 1 of 1

Nucleo-F030R8 and ILI9341 Changing SPI Speed

Posted: Sun Jun 07, 2020 9:22 pm
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?

Re: Nucleo-F030R8 and ILI9341 Changing SPI Speed

Posted: Sun Jun 07, 2020 9:40 pm
by stas2z
No, maximum speed of spi is cpu clock divided by 2

Re: Nucleo-F030R8 and ILI9341 Changing SPI Speed

Posted: Sun Jun 07, 2020 10:10 pm
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

Re: Nucleo-F030R8 and ILI9341 Changing SPI Speed

Posted: Sun Jun 07, 2020 10:40 pm
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

Re: Nucleo-F030R8 and ILI9341 Changing SPI Speed

Posted: Sun Jun 07, 2020 11:05 pm
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.

Re: Nucleo-F030R8 and ILI9341 Changing SPI Speed

Posted: Mon Jun 08, 2020 1:28 am
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