Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSRAM buffer, cache timings #31

Open
AndrewCapon opened this issue Dec 30, 2024 · 0 comments
Open

PSRAM buffer, cache timings #31

AndrewCapon opened this issue Dec 30, 2024 · 0 comments

Comments

@AndrewCapon
Copy link

Hi Guys,

Not really an issue but a bit of info you might want to look into.

With a PSRAM back buffer I noticed the speeds seemed a bit off, so I investigated turning the cache off. Im running with a 266 clock here.

#if USE_UNCACHED
  back_buffer = (uint16_t *)ps.Malloc(FRAME_WIDTH * FRAME_HEIGHT * 2) + 0x02000000;
#else
  back_buffer = (uint16_t *)ps.Malloc(FRAME_WIDTH * FRAME_HEIGHT * 2);
#endif

ps.Malloc is mallocing from PSRAM.

With two timing examples:

The first is a simple clear to black memset(back_buffer, 0, FRAME_WIDTH * FRAME_HEIGHT *2);
With cacheing tuned off this takes around 22ms, with cacheing on it takes around 30ms.

The second example is drawing 100 rectangles of 16x16
With cacheing off takes around 5ms, with cacheing on it takes around 14ms

I'm guessing that the cache is getting swamped quickly and then the flash execution times are going down?

I know that Mike has said you use PSRAM for the back buffer in 480x480 so it might be worth you testing it out uncached to see if you get speed improvements.

Cheers

Andy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant