Hi. I am not sure if this is the correct place to post this, but it kinda relates to the LPC2148.
Sorry if this is common knowledge or something, but I can’t seem to find good information on this anywhere. I am attempting to use a [LPC2148 demo code, specifically, I am trying to use the [FatFS code to get the controller to talk to a memory card. It does work for some cards, but not for others. I believe the reason stems from some cards having a non-standard block size. I have one card (2GB not SDHC) which reports a block size of 1024. The read function fails when attempting to read anything from this card, and near as I can tell, the card stops responding after the first read (I get one 512 byte chunk of good data and then nothing but 1s).
Reading the [SD Card Specs I came across two interesting tidbits on page 96:
In case of Standard Capacity Card, the size in the data token is determined by the block length set by SET_BLOCKLEN (CMD16).
The maximum block length is given by 512 Bytes regardless of READ_BL_LEN, defined in the CSD.
I use CMD16 to set the block length to the maximum value in the CSD (1024) during the card initialization routine. From what I understand, that should make the read command return that number of bytes. However, it seems like from the second quote, that I am not allowed to do this. Has anyone else run into this problem? and if so, what is the proper solution.
I will probably try to set a smaller block size with CMD16 and see what happens, but I am running out of ideas.](http://www.sdcard.org/developers/tech/sdcard/pls/)](FatFs - Generic FAT Filesystem Module)](LPC2148 Demo Code Overview)