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
The code associated with this application report is designed as a driver set for communication between an MSP430 MCU and an MMC card or an SD card through the SPI bus as described in Section 1. The code is written modularly and can be reused easily. Only a subset of the available card commands is used, based on the limitations of the SPI interface and the secure functions of the SD card. This sample code can be downloaded from http://www.ti.com/lit/zip/slaa281.
An example main() function shows the proper use of the driver functions.
Uncomment the following line of code to use the MSP430F1612 DMA module for data transmission between the MCU and the MMC card, which results in higher communication speed and less CPU load.
//#define withDMA
If you adapt the software to a different USART or a different device in which the USART is connected to other port pins, modify the following functions for the correct settings: