This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Fatsd example for MSP432 LaunchPad isn't working

Other Parts Discussed in Thread: ENERGIA

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!

  • So the issue turned out to be a lack of clear documentation on how to wire the hardware for this example. It is for use with the boosterpack available from 43oh!.com however, the CS pin for enabling the pin is not in a standard location. I had to look back from the schematic of the boosterpack to see that pin P4.6, a GPIO pin, was used for the CS pin. I connected it and the example worked but having to spend 7 hours debugging a simple lack of pin hookup documentation was frustrating....
  • Hi Eric,

    Sorry for the frustration. In your opinion, where do you think the documentation should have been?

    Thanks,
    Todd
  • Hi Todd,

    I feel that the documentation for the Pin Connections should have been in the fatsd_readme.txt that is included the project folder that you import from the TI Resource Explorer. At least some indication that for the MSP432, the CS pin is P4.6 and all of the other pins for the various types of MSP43x devices. The software examples and their readme's are well done and make sense but there is no text or picture indication of how to hook up hardware in the readme. 

    Currently the only notes for the MSP432 development board is that it requires an external SD card boosterpack. I respect that the TI ecosystem works well with boosterpacks but I should be able to hook up my own version of the SD card reader (such as one from eBay that costs $1) and still get it to work. The SD card reader that I linked above is often touted to be an Arduino SD card reader (even though its not on a shield), however it is just a breakout for the SPI pins and I would have liked that to be documented.

    A last bit of frustration in the debug process was that I looked at the pin map in the product's box. Highlighted are the supposedly standard connections for CS pins that boosterpacks might be able to use. When all 3 of them didn't work, that prompted me to look at the schematic of 43oh!'s boosterpack and finally solved the problem.

    Does this help?

    Thanks,

    Eric Bauer

  • Hi Eric,

    Thanks for the constructive feedback. We do try to include board specific information in the TI-RTOS Getting Started Guide, but having it the readme is a better place. We are actively looking at moving more board specific documentation into the readme.txt files (and potentially making them an html or some other format so we can easily add pictures). Thanks for confirming that others agree that this is the right direction.

    Todd
  • I would love HTML documentation for this sort of thing. I am most experienced in the hobbyist realm of actually doing hands-on projects, but I wanted the professional capabilities of TI-RTOS in my application. Tutorials like the ones available on Sparkfun or Adafruit are excellent at explaining the operation of the software and hardware at a hobbyist level. Any professional can easily follow them and extract more value out of the tutorial.

    Thanks again for being open to feedback!