Faster spi on the rp2040

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
BenR
Matrix Staff
Posts: 1739
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: Faster spi on the rp2040

Post by BenR »

Hi Chad,

The Pico and RPI3 should both be free targets in v10 so no need to purchase for these devices.

Chadb
Posts: 63
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 23 times

Re: Faster spi on the rp2040

Post by Chadb »

Ok got it running on 10. It is slower than the software version in 9.

If I select software, it is much faster than spi1. And much faster than 9

Chadb
Posts: 63
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 23 times

Re: Faster spi on the rp2040

Post by Chadb »

I am only talking about v10 now.

Channel 1 spi0 : 956ms to do a setbackground color +clear display
Software: 176ms to do a setbackground color +clear display

c

Just for fun: V9: 300ms to do a setbackground color +clear display

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: Faster spi on the rp2040

Post by BenR »

Ok thanks for letting us know that's interesting, what prescaler do you have on the hardware SPI?

I've not played muych witht he Pico but maybe there are other things we can do to improve things. I assume you have the pixel queue property enabled when using the SPI mode.

I'll also have another look and make sure the SPI transfer we're using is the fast way of doing it.

Chadb
Posts: 63
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 23 times

Re: Faster spi on the rp2040

Post by Chadb »

The prescaler was blank and I didn't change it. I just set it to 80mhz, and I am now getting 88ms update. That's better. I'll try different prescales. For the pixel queue size, It is set at 240. I am running the display in landscape and have it rotated. What should I set it to? If I set it to 320 I get two lines through the display. my display is 320x240.

Thanks,
Chad

Chadb
Posts: 63
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 23 times

Re: Faster spi on the rp2040

Post by Chadb »

queue fast pixels makes no difference. enabled or disabled.

Chadb
Posts: 63
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 23 times

Re: Faster spi on the rp2040

Post by Chadb »

More testing, Anything set in the prescaler above 25mhz makes no change : 88ms setbackground

Post Reply