This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Mount spi-device: SPI bus to write on sd card

Dear all,

I am using a AM335xx with a linux-debian on it. I would like to use SPI1 to save data on SD card.

Right now, what I can do is to use spidev1.0 (and spidev1.1) to talk with my SD card via ioctl.

It means that I can write on the SD card by using the procedure based on CMD0,CMD8 etc..etc (which is the standard procedure in case you want to write row data on a SD card). I would like to know if there is a driver which allows me to use some functions (such as open_file(filename),close_file(filename), write_data,read_data) in such a way I have not to set all CMD command from scratch. Is there a driver which allows me to see the SD card connected to SPI1 as an external memory which I can mount as spi-device?

Thanks for your help.

Alberto

  • Hi Alberto,
     
    We don't support Debian Linux on this forum (support for it can be found at http://beagleboard.org/Community/Forums), but what you want to do is a very challenging task in my opinion. Why aren't you using the generic MMC interfaces?
  • Hi Biser,

    thanks for your answer and I am sorry to made a thread based on beaglebone-black and debian: I already saw several posts which written that they are not supported.

    By the way, you are perfectly right:

    I cannot use MMC1 and MMC0 (I am already using the gpmc bus and one SD card which cannot allow me to use MMC0 and MMC1 in the beaglebone-black), but there is still MMC2, which I forgot to take into account when I wrote my post. It can be used to set a communication with a second SD card with a 4-bit communication.

    Thanks again.

    Alberto