Hello, I am having trouble using the "fatsd_MSP_EXP432P401R_TI_MSP432P401R" example project from the TI Resource Explorer.
Some basic information:
IDE: CCSv6
Hardware Platform: MSP432P401R LaunchPad
SD Card Module: one similar to this
Pin connection scheme A: [ sd3.3V --> msp3.3v, sdGND --> mspGND, sdCS --> mspP3.0, sdMOSI --> mspP1.6, sdMISO --> mspP1.7, sdSCK --> mspP1.5 ]
Pin connection scheme B: [ sd3.3V --> msp3.3v, sdGND --> mspGND, sdCS --> mspP1.4, sdMOSI --> mspP1.6, sdMISO --> mspP1.7, sdSCK --> mspP1.5 ]
The Error:
The example project builds with no issues. The console output when hitting 'Run' in Debug mode is as follows:
[CORTEX_M4_0] Starting the FatSD example
Drive 0 is mounted
Creating a new file "fat:0:input.txt"...Error: "fat:0:input.txt" could not be created. Please check the Getting Started Guide if additional jumpers are necessary. Aborting... |
This error procedure is handled around line 129 of fatsd.c and it is the failure to create a new input file on the SD card. The suggestion to check the user's guide is only so helpful since it does not actually show a specific connection diagram for how to fully complete this example. The specific guide for the MSP43x MCU family that I referred to is this one. By looking at page 27 of that guide, it is clear that "SD Card. Uses FatFs and the SDSPI driver on EUSCI_B0 without interrupts to read and write to files."
Thus it seemed necessary to connect the SD Card breakout and the MSP432 LaunchPad in Pin Config B, which looks correct according to page 7 of the MSP432P401R datasheet. The only issue with trying Pin Config B is that P1.4 is not readily broken out. It is connected to S2, the rightmost button on the board. I soldered a wire to the through-hole connection of the switch that was connected to pin 8 on the MSP432P401R chip. Only after this solder job was I able to test the example against Pin Config B, but I still received the same error of not being able to write to the card.
The original pin configuration that I used was Pin Config A, which was derived from the Energia Pin Map found here. This is what I originally tried with the Fatsd example and it receives the same error shown above.
I have tested the example against the following and all have received the same error:
- different computers to build and debug
- different SD card breakouts (of different manufacture, same pinout though)
- different SD cards (4GB and 8GB SDHC from SanDisk)
I hope that someone is able to help me resolve this error, whether it is in the software example or in the physical pin connections. I appreciate it in advance!