mbro131
Joined: 22 May 2006 Posts: 9
|
SD/MMC clock control |
Posted: Wed May 31, 2006 9:24 pm |
|
|
I am using a PIC18F2550 to interface with a SD/MMC card. My system needs to be able to use high capacity cards (1GB+) and must also allow them to be interfaced with a Windows system.
The FAT16 file system can reference a maximum of 32MB if 512byte block sizes are used, however if larger block sizes are used then this increases. Is it possible to use 16kB block sizes (to allow for 1GB cards) but only transfer this from the PIC 512bytes at a time?
According to the Simplified Physical Layer Specification:
Quote: | ...The host is allowed to lower the clock frequency or shut it down. For example, in a case that a host with 512Bytes of data buffer would like to transfer data to a card with 1KByte write blocks. So, in order to reserve a continuous data transfer, from the cards point of view, the clock to the card shall be stopped after the first 512Bytes. Then the host will fill it internal buffer with another 512Bytes. After the second half of the write block is ready in the host, it will continue the data transfer to the card by re-starting the clock supply. In such a way the card does not recognize any interruptions in the data transfer.
There are a few restrictions the host must follow:
� The bus frequency can be changed at any time (under the restrictions of maximum data transfer frequency and the identification frequency defined by the specification document).
� An exemption to the above is ACMD41(SD_APP_OP_COND). After issuing command ACMD41 the following 1) or 2) procedures shall be done by the host until the card becomes ready.
1) Issue continues clock in frequency range of 100KHz-400KHz.
2) If the host wants to stop the clock, poll busy bit by ACMD41 command at less than 50ms intervals. | (p.38)
This indicates to me that if a discontinuous clock is used, then the block size limit is not restricted by the size of the buffer in the PIC. What i could not work out is if this applied in both SD Card mode and SPI mode.
Any comments would be appreciated.
Regards
Matt |
|