LPC2xxx and old SDcard => low tranfer rate

I use a LPC2138 with efsl0.2.8 and the 16MB sd-card that came with the Canon camera.

Even compiling with opt -3 and SPI0 at 7MHz, I can only write at a poor 20kilobytes/s. Yes, 20 kilobytes per seconds. I took the logic analyzer. The SPI0 is transfering continously data. After some debug sessions, I discovered that writing a single block take <1ms, but it takes up to 6 or 7ms waiting write completion.

Using the 256MB sd-card, the tranfer rate rised to 150kB/s :shock:

So be carefull using SD-cards, when you need fast write rates. And use SPI1, wich is FIFOed and alows faster clock speed than SPI0.

Angelo