Other Parts Discussed in Thread: MSP-EXP430FR5994
Hi
I'm trying to write to, and read from, the microSD card on the MSP430FR5994 Launchpad. I have previously converted the 'Out of box experience' to use the SD card alone, but the speeds I am getting are too slow (I need to sample and store 32 bits of data at 5000Hz). I want to try write data to sectors of the SD card without creating a file (I plan to convert it later after collecting data).
I am trying to use SLAA281B 'Interfacing the MSP430 With MMC/SD Flash Memory Cards'. I have noted from the Launchpad schematic that the SD card connections are as follows:
CS - P4.0
MOSI - P1.6
SPICLK - 2.2
MISO - P1.7
SD_DETECT - P7.2
My questions are:
1) In the libraries, it seems that MOSI, MISO and CLK are all on the same port, however they are not on this launchpad. I am unsure as to how I should go about changing this without interfering with the code operation.
2) What components of the code can I remove to optimize speed? I know I'm using SPI (USCIB0), so I've attempted to remove checks for other communication methods with little success.
3) When main.c uses 'mmcReadSector', the data isn't stored to a variable. Would a variable declared as 'char RXData[512]' suffice?
4) To determine how many total sectors are available for use, can the 'mmcReadCardSIze' function be used?
Sorry for basic questions, I am not experienced in this area.
Thank you
John