I am using the default SPI pins to read-communicate with an SD card and I have run into a couple of issues. I am trying to create an Arduino program for the Pico Pi that reads 565 RGB video frames from an SD card and displays them on an LCD screen. Not rocket science I know. I am using Bodmer's TFT_eSPI library (converted to use SPI_1) and have gotten it running on both the Philhower core and the Mbed core... sort of. Painfully slow for the SD (SPI_0) reads. Also I am doing my best to convert to Mbed because the same screen frame writes on the Philower core are ~3X faster (Mbed: 46.5fps, Philhower: 17.5fps.) . But adding the SD reads drops the frame rate to 0.64 fps on the Mbed core. Ugh.
I don't know if this is the right place to ask these but here goes:
- I have noticed that the SD library for the Mbed Arduino core requires a "8.3" file naming format whereas the Philhower version did not. Took me a while to figure out why I was getting a file-not-found error for longer named files.
- There is some sort of problem with longer SD reads on Mbed. With the Philhower core I could read an entire frame (153600 bytes) in one SD.read. In the Mbed core I need to break the SD file read into 4 SD.read calls to read in the data correctly and completely. Why?
- Is there anything that can be done to increase the SPI clock for the SD reads? For instance, I am running the LCD SPI clock at 62.5 MHz (on SPI_1) but I don't seem to have the option to change the SD SPI (SPI_0) clock. Is there a way to do that?
Thanks very much for your time. Any insights would be appreciated.