Faster spi on the rp2040

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
Chadb
Posts: 63
http://meble-kuchenne.info.pl
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 23 times

Flowcode v9 Faster spi on the rp2040

Post by Chadb »

Hi, I am using a display 320x240 (st7789) and I stumbled on this from adafruit.

https://www.youtube.com/watch?v=5mzlP_6rZ7w

Apparently there is a way to block send SPI that is ~10 times faster.

Could this be implemented?

Thanks,

Chad

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

Re: Faster spi on the rp2040

Post by BenR »

Hi Chad,

The ST7789 display component doesn't currently use the SPI layer.

I'll see how easy it is to allow it to use SPI and if it's possible then I'll also add the pixel buffering properties and code I did for ESP to acheive a similar SPI speed optimisation.

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

Re: Faster spi on the rp2040

Post by Chadb »

That would be awesome! I am going to try to implement a little menu with an encoder knob and .bmp's and right now it is so slow it might not be usable.

I think I am going to be using the lcd bitmap drawer, and the display manager..

Thanks,
Chad

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

Re: Faster spi on the rp2040

Post by BenR »

Hopefully all done for you now, just pushing to the update system.

The display component now lets you select between SPI or standard IO pins and when SPI is selected it lets you select to enable the Fast Pixel buffer to put SPI operations together in to a single burst. Hopefully should speed things up for you a lot.

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

Re: Faster spi on the rp2040

Post by Chadb »

Super great!!! I will give it a try right now and let you know!!

Thanks!

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

Re: Faster spi on the rp2040

Post by Chadb »

Not seeing it yet. Doing a full database check. How long does it usually take to filter through?

c

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

Re: Faster spi on the rp2040

Post by BenR »

Hmm it should be there now, but I've only made the change in v10, is this what you're using?.
Cmp.jpg
Cmp.jpg (52.03 KiB) Viewed 3588 times
Aha just seen the v9 logo on the top post, doh.

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

Re: Faster spi on the rp2040

Post by Chadb »

Oh, no. I only have version 9.

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

Re: Faster spi on the rp2040

Post by BenR »

Might be worth you trying v10 and see how you get on, you should be able to do it all for free and using your existing toolchains.

This shouldn't effect your v9 installer either so you can continue to use this for anything that would cost you money in v10.

Here's what v10 offers for free https://www.flowcode.co.uk/free/

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've never actually completed a project in flow code, yet I have bought pretty fully loaded 8 and 9. It started with wanting to make a dmx widget and I couldn't get that working correct on the st arm's that I had. I'll give it a try in 10 and maybe buy the rp chip pack.

Thanks,
Chad

Post Reply