NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on The site is now set to read only.

CC3200 SDHost FatFS

From Texas Instruments Wiki
Jump to: navigation, search


      The Secure Digital Host (SD Host)controller on CC3200 provides an interface to standard SD memory cards in 1-bit transfer mode and handles the SD protocol and data packing at transmission level with minimum CPU intervention.

Application details

      This application uses the FatFS to provide the block level read/write access to SD card, using the SD Host controller on CC3200. The application initializes the FatFs and lists the files and/or directories that are present on the SD card at the root followed by contents of a predefined file on the terminal. The application also writes a predefined pattern to a predefine file. The user can change the predefine(s) by changing following macros

    #define USERFILE        "userfile.txt" // Application reads out this file
    #define SYSFILE         "sysfile.txt"  // Application write to this file
    #define SYSTEXT         "The quick brown fox jumps over the lazy dog" // Pattern to be written to SYSFILE

Here is the SDCard booster board which can be mounted on CC3200 Launchpad

CC32xx SDCard BP.JPG

Source Files briefly explained

  • main.c - Implements the main function.
  • diskio.c - Implements low-level function for FatFS using DriverLib API(s)
  • pinmux.c - Generated by Pinmux utility to mux out the SD Host controller signal to chip boundary.
  • uart_if.c - Implements the UART terminal.
  • startup_ewarm.c - Implements interrupt vector table when using IAR ewarm tool chain
  • startup_css.c - Implements interrupt vector table when using CC tool chain

Build the board

User can order a SD Card booster pack from 40Oh to work with the CC3200 Launchpad, but the connector definitions do not match. Some board modifications require to make it work with the CC3200 LAUNCHXL Rev 3.2(onwards).

The board is available here


Here is the ECO List

  1. Scratch out traces at SJ1 , SJ2, SJ3, SJ4
  2. Blue wire the following pins
SDCard Pin no. Header Pin
2 J2.18
5 J2.15
7 J2.14

The board looks as below with the changes

Diagram of wiring


Here is the ECO List

  1. Scratch out traces at SJ1 , SJ2, SJ3, SJ4
  2. Blue wire the following pins
SDCard Pin no. Header Pin
2 J2.3
5 J2.6
7 J2.7

The board looks as below with the changes

CC3200 SD Card BP board.jpg


  • Setup a serial communication application (HyperTerminal/TeraTerm) with following settings. For detail info visit Terminal setup

   - Port: Enumerated COM port
   - Baud rate: 115200
   - Data: 8 bit
   - Parity: None
   - Stop: 1 bit
   - Flow control: None

  • Connect the SD Card to the LP board as shown below
LP Pin SD Card Pin Signal Name
P2.3 2 CMD
P3.2 3 GND/Vss
P1.1 4 Vcc/Vdd
P2.6 5 CLK
P2.1 6 Vss
P2.7 7 DAT0
  • Run the reference application (Flashing the bin/IAR/CCS).
  • Observe the status messages on the host over serial port to understand the sequence of operations performed by the application.

Limitations/Known Issues

For many SD cards pull up resistors are required on the bidirectional signal lines, DAT0 and CMD.