We got some discussion about the PSRAM and LCD limitation here.
Just received my picocalc today so I can’t try anything I’ve talked about in the topic. For now…
Using baremetal approach, yes we can use the other processor (or DMA) to send data to the dedicated SPI. The complexity will be in sharing the memory between 2 async CPU.
About SPI, I’m not sure about the LCD limitation… On the paper (datasheet of ILI9488), the max timing for the SPI is about 20 MHz for the clock. But I think you can extend to 40-50 MHz with less integrity of data (because the hold+setup time is equal to 50 MHz).
You said it took 0.3s to render a frame, this is more or less my worst estimate for 20 MHz.
So I guess the SPI is still at 25 or thereabouts, not 75, because you set the spi baudrate but not the spi clock. If I don’t mistake, set_baudrate ask for a freq, but if the spi clock is not fast enough, it will use the max it’s can. (sorry I didn’t experiment too often with RPxxxx clock tree to be more precise of how to)
Always on paper, the screen in its max SPI configuration, could refresh 320x320x16 at 12.2 FPS. Maybe 15-16 if you push the SPI without corrupting data.
DMA is a good friend for tasks who need to move data in the memory without requiring CPU.
spi_write_blocking don’t use DMA, only a simple while loop to fill the transmit/receive buffer.
You can find an exemple here of how to use SPI with DMA. Can be quite confusing, so don’t exitate to experiment with this exemple first.
For the PIO, depend of the requirements… In general, the dedicated peripheral do the job better, but in some case, where you need to handle some bit manipulation, or like using a QSPI, SPI peripheral doesn’t suffice and the PIO come to the rescue!
Don’t take this statement at face value, it’s just a generalisation about dedicated circuits vs. programmable circuits. You’d need testbenchs to compare numerical results.
Also beware that Luckfox Lyra use Rockchip chip, not an RP2xxx, so no PIO will be available and the pico-sdk will not be compatible. I saw someone using linux drm directly to render things on screen but can’t find it…