Max speed of SPI port for SD/MMC?
2006-01-19 by Ed Schlunder
I'm a little confused at what speeds can SD/MMC cards be accessed using SPI on the LPC2103. Normal SD/MMC cards support max 25MHz for SD and 20MHz for MMC. If my LPC2103 is clocked at 70MHz, APB divider set to 1, then it looks like the maximum speed I can get out of SPI0 is by setting the S0SPCCR SPI clock counter register to it's minimum value of 8. 70MHz/8 = 8.75MHz, which seems pretty slow. SPI1 is more complicated. Set APB divider to 1, SSPCPSR clock prescale register to minimum value of 2 and SSPCR0.SCR to 0. This gives 70MHz / (2 * (0+1)) = 35MHz, which is too fast. The next best setting would then be SSPCPSR to 4 (only even values allowed), giving 70MHz / (4 * (0+1)) = 17.5MHz. If I wanted to hit the magic speed of 25MHz for SD Cards, I would have to run the LPC2103 clocked at 50MHz. Then SSPCPSR set to 2 would provide 50MHz / (2 * (0+1)) = 25MHz. From what I understand, SPI1 also provides 8 byte FIFOs for send/receive. It sounds like I need to use the SPI1 port, and forget about the SPI0 port.