MMC/SD interface for the CC1000

Last updated: August 8, 2007
Under construction


At least 4 signals of IO Port D of the MPC823 are available on the J802 connector. These signals can be used to implement a MMC/SD interface.
Possible connectors are: a real MMC/SD connector, an old floppy disk connector or an ISA bus connector (use the small one). Do not insert the card too far into a floppy or ISA connector, the card won't make contact.

[cc1000_mmc_sd.png] [mmc_sd_contacts.jpg]

See the CC1000 Hardware description for J802 pin numbers.

MMC/SD signal MMC/SD connector Port D signalPort D maskJ802 connector
CS 1 PD10 0x0020 13
DI 2 PD14 0x0002 3
GND 3 - - 5
Vcc (3.3V) 4 - - 4
CLK 5 PD06 0x0200 19
GND 6 - - 5
DO 7 PD15 0x0001 8

PiggyBack board

The 4MB version of the CC1000 has a pinheader on J802. This is a suitable mounting point for a small piggyback board with a real SD card connecter and a few other parts, e.g. a RS232 driver for the second serial port.

Piggyback board mounted on a 4MB CC1000
Backside of a piggyback board with only the SDcard connector mounted

Software and system configuration

The CC1000 kernel contains a modified version of the SD card driver for the WRT54G. See the reference below.
During boot mmc.c issues the following messages:
	mmc Hardware init
	mmc Card init
	mmc Card init *1*
	mmc Card init *2*
	Size = 2011136 KByte, hardsectsize = 512, sectors = 4022272
Large SDcards (>= 2GB ?) seem to have a sector size of 1024 bytes, while the smaller cards have 512 byte sectors. For large cards the driver sets the sector size to 512 bytes and doubles the number of sectors. This hack seems to work.
Device driver entries in /dev are cretaed with:
	cd /dev
	mknod mmca b 121 0
	mknod mmca1 b 121 1
	mknod mmca2 b 121 2 
	mknod mmca3 b 121 3 
	mknod mmca4 b 121 4 

The device driver uses the SPI mode.
Transfer speed reading: approx. 275 KB/sec.
Transfer speed writing: approx. 133 KB/sec.

References:



Archive containing the hardware related Xcircuit files and the SD card driver (mmc.c).