Hi,
at the moment I am trying to interface a SD Card with the MSP430G2231.
Therefore I´m using the MMC library functions provided by TI.
Now the problem is after sending the Go_Idle command to the SD Card it always responses
with a TIMEOUT_ERROR and I really can´t imagine why.
Maybe a bit more precise explanation :
First I raise Chip select and send some dummy bytes to the sd card for about 80 clock cycles.
Then I pull CS low and send the Go_Idle command to the sd. Afterwards I try to read the response of the
sd card and that´s where it answers with the timeout error.
The voltage levels are perfectly correct ( I just measured it).
But I don´t know if the MSP430 clocks properly (can´t measure it because I have no scope).
So here´s my port initialization :
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P1OUT = 0x10; // P1.4 set, else reset
P1DIR = 0x01; // P1.0 output, else input
P1DIR |= SD_CS; // Set P1.4 to output direction Chip Select
P1DIR |= SPI_SCLK; // Set P1.5 to output direction Master Clock
P1DIR |= SPI_SDO; // Set P1.6 to output direction Data Output
USICTL0 |= USIPE7 + USIPE6 + USIPE5 + USIMST + USIOE; // Port, SPI master
USICKCTL = USIDIV_4 + USISSEL_2 + USICKPL; // /16 SMCLK
USICTL0 &= ~USISWRST; // USI released for operation
USISRL = 0x00;
for (i = 0xFFF; i > 0; i--); // Time for slave to ready
USICNT = 1; // init-load counter
Hope somebody could help me.
Regards, Max










: