SD card interfacing

Hi,

I have written SD & SDHC card routine for reading, writing and erasing data from SD card. It used the hardware SPI of nRF51822.

NOTE:

1)Define the PINs of SD card first before initialing.

2)Define MOSI, MISO and SCK pins only, define the CS pin to some other pin that is not being used( these pin are define in spi_master_config.h )

3)CS pin should be separately define in SD_Routines.c by the name #define MMCSD_PIN_SELECT 29

4)If you are facing problem in using my library then first test you SPI separately.

SD_Routines.c SD_Routines.h

Parents
  • Hi,

    I want to write on an SD card and I tried to use your files but i faced some problems. First, the functions spi_master_init(SPI0,SPI_MODE0,0) and spi_master_tx_rx( SDCard_spi ,1, spi_txbuf, spi_rxbuf) were not existing anymore in the current API (developer.nordicsemi.com/.../a00767.html

    So I changed the functions to spi_master_open(SPI_MASTER_HW, &spi_config) and spi_master_send_recv(SPI_MASTER_0,spi_txbuf,2,spi_rxbuf,2) but now I'm facing a new problem concerning the linking step:

    Error: L6218E: Undefined symbol app_error_handler (referred from spi_master.o).

    I don't know how to solve it. I included the library app_util_platform.h too.

    Thank you in advance. Best regards. SD_Routines.c

Comment
  • Hi,

    I want to write on an SD card and I tried to use your files but i faced some problems. First, the functions spi_master_init(SPI0,SPI_MODE0,0) and spi_master_tx_rx( SDCard_spi ,1, spi_txbuf, spi_rxbuf) were not existing anymore in the current API (developer.nordicsemi.com/.../a00767.html

    So I changed the functions to spi_master_open(SPI_MASTER_HW, &spi_config) and spi_master_send_recv(SPI_MASTER_0,spi_txbuf,2,spi_rxbuf,2) but now I'm facing a new problem concerning the linking step:

    Error: L6218E: Undefined symbol app_error_handler (referred from spi_master.o).

    I don't know how to solve it. I included the library app_util_platform.h too.

    Thank you in advance. Best regards. SD_Routines.c

Children
No Data