[En-Nut-Discussion] EIR: SD-Card on SPI

Markus Dost markus.dost at dr-clauss.de
Tue Jan 29 11:29:44 CET 2013

Hi Harald,

thank you for your advices. At the moment, the SD-Card on my board is 
attached to the SSC like on the EIR. For I don't use the audio codec I 
would take the advantages of using SPI. But before I redesign my board I 
have to be shure that I can still use the Phat-filesystem.
> If you want SPI, the optimal way is to register the SPI bus
> http://www.ethernut.de/en/documents/ntn-6_spi.html
I noticed this document, but the section

     "At the time of this writing file system support for devices 
attached to the SPI bus controller framework is almost non-existent. 
There is one exception, the rather simple raw file system.

     You may know, that Nut/OS offers the FAT compatible PHAT file 
system, which uses MMC/SD-Cards in SPI mode. However, the related low 
level drivers implement their own SPI routines. It would be a     
benefit to re-write them for using the new SPI bus interface. Work is in 
progress to close this gap."

confused me and additional I didn't noticed Oles SPI driver.

Just to be sure: with this driver I initialize the SD-Card with

	NutRegisterDevice(&devPhat0, 0, 0);		// Phat filesystem
	NutRegisterDevice(&devSpiMmcGpio, 0, 0);	// SPI driver for MMC
	_open("MMC0:/PHAT0", _O_RDWR | _O_BINARY);	// mount the Card

and the functionality for reading/writing files and directory operations 
remains the same?

Best regards,

More information about the En-Nut-Discussion mailing list