-
Notifications
You must be signed in to change notification settings - Fork 496
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
ST7789::write_blocking_parallel could use DMA? #776
Comments
Good spot. Just tested this and went from 29.55ms to 9.88ms for RGB565 pens. Pretty much exactly what you found. I've raised a PR with a fix, though I've swapped the ugly stall mask check for a loop polling |
Since you're tinkering with Tufty, what do you make of #567? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I was noticing that a
display.update()
on the Tufty2040 was taking about 30ms to send a full size RGB565 framebuffer to the display.When investigating, I noticed that forcing the PIO's clock divider to 2 or even 1 made no impact on the update time and that the CPU was never having to wait for space in the FIFO.
I also noticed that there already was some code in the parallel version of the constructor to configure a DMA channel, but it's then not used for all data transfers.
Replacing the existing initial transfer loop at the start of
write_blocking_parallel
with the following sped updisplay.update()
to about 9.8ms!It does seem necessary to keep the subsequent loop that polls the stall mask: if I remove it, I see a handful of non-updating pixels at the bottom right of the display. (I guess removing it causes CS to be deasserted before the PIO has finished sending every byte and so the display doesn't get the last few bytes)
The text was updated successfully, but these errors were encountered: