SPI SD card is very slow with Nano
Posted: Wed Oct 08, 2014 12:09 pm
I have a Nano-based project that reads and writes to a micro SD card on a custom board. This project was migrated from a MOD5234-based one on a different custom board that used an SD (not micro) card in SPI mode. The board for the Nano project was designed for 4-bit SD mode. My understanding is that the NNDK (2.6 is what I have) doesn't have a driver for the fast SD mode but it should still operate in SPI mode. I don't believe much (if any) of our file IO code has changed between the two projects.
The problem is that IO appears to be significantly slower on the Nano-based hardware. Calling f_format() on a 4GB Class 4 microSD card takes upwards of 2 minutes, where the same call takes 17 seconds for a 2GB SD card on the MOD5234 hardware. I realize that's a card half as big, but it still doesn't seem like it should take that long. I've also seen consistent writes of a ~40KB file take around 17 seconds on the Nano hardware and 4 seconds on the MOD5234.
Does anyone know why it's so slow, or can suggest what to look at?
Thank you
The problem is that IO appears to be significantly slower on the Nano-based hardware. Calling f_format() on a 4GB Class 4 microSD card takes upwards of 2 minutes, where the same call takes 17 seconds for a 2GB SD card on the MOD5234 hardware. I realize that's a card half as big, but it still doesn't seem like it should take that long. I've also seen consistent writes of a ~40KB file take around 17 seconds on the Nano hardware and 4 seconds on the MOD5234.
Does anyone know why it's so slow, or can suggest what to look at?
Thank you