SLAA281C November   2005  – August 2018 MSP430F1610 , MSP430F1610 , MSP430F1611 , MSP430F1611 , MSP430F1612 , MSP430F1612 , MSP430G2001 , MSP430G2001 , MSP430G2101 , MSP430G2101 , MSP430G2111 , MSP430G2111 , MSP430G2121 , MSP430G2121 , MSP430G2131 , MSP430G2131 , MSP430G2201 , MSP430G2201 , MSP430G2201-Q1 , MSP430G2201-Q1 , MSP430G2211 , MSP430G2211 , MSP430G2221 , MSP430G2221 , MSP430G2231 , MSP430G2231 , MSP430G2231-Q1 , MSP430G2231-Q1

 

  1.   Interfacing MSP430™ MCUs With MMC or SD Flash Memory Cards
    1.     Trademarks
    2. 1 Hardware Description
    3. 2 Software Description
    4. 3 Function Description
      1. 3.1 char mmcInit (void);
      2. 3.2 char mmcping(void);
      3. 3.3 void mmcSendCmd (const char cmd, unsigned long data, const char crc);
      4. 3.4 char mmcGoIdle();
      5. 3.5 char mmcSetBlockLength (const unsigned long);
      6. 3.6 char mmcReadBlock(const unsigned long address, const unsigned long count, unsigned char *pBuffer);
      7. 3.7 char mmcWriteBlock (const unsigned long address, const unsigned long count, unsigned char *pBuffer);
      8. 3.8 char mmcReadRegister (const char cmd_register, const unsigned char length, unsigned char *pBuffer);
      9. 3.9 unsigned long mmcReadCardSize(void);
    5. 4 References
  2.   Revision History

Hardware Description

The MSP430F1612 communicates with the MMC or SD card through the SPI interface. SPI is a fast and efficient protocol that allows for simultaneous bidirectional data transfer. Serial data is transmitted and received by the MSP430 MCU using the USART module in SPI mode. Figure 1 shows the hardware interconnection for the master-slave configuration operating on a single supply voltage.

The associated MSP430F1612 pins P5.3 and P5.4 are configured as GPIO to control the chip-select pin and read the memory card detect signal. The USART1 hardware peripheral of the MSP430F1612 is configured in the 3-pin SPI mode. Pins P5.1, P5.2, and P5.3 of the MSP430 MCU provide the SIMO1, SOMI1, and UCLK1 interface to the MMC card.

connection-between-msp430-mcu-and-mmc-card.gifFigure 1. Connection Between MSP430 MCU and MMC Card