Example Summary

This example performs raw read and write operations with a Secure Digital (SD) card. This example may corrupt any file system present on a SD card.

Peripherals & Pin Assignments

When this project is built, the SysConfig tool will generate the TI-Driver configurations into the ti_drivers_config.c and ti_drivers_config.h files. Information on pins and resources used is present in both generated files. Additionally, the System Configuration file (*.syscfg) present in the project may be opened with SysConfig’s graphical user interface to determine pins and resources used.

BoosterPacks, Board Resources & Jumper Settings

This example requires a BOOSTXL-SHARP128 LCD & SD Card BoosterPack and a micro SD card.

For board specific jumper settings, resources and BoosterPack modifications, refer to the Board.html file.

If you’re using an IDE such as Code Composer Studio (CCS) or IAR, please refer to Board.html in your project directory for resources used and board-specific jumper settings.

The Board.html can also be found in your SDK installation:

    <SDK_INSTALL_DIR>/source/ti/boards/<BOARD>

Example Usage

The connection should have the following settings

    Baud-rate:  115200
    Data bits:       8
    Stop bits:       1
    Parity:       None
    Flow Control: None

Application Design Details

This application uses one thread:

The mainThread performs the following actions:

  1. Create and initialize the SD driver.

  2. Read the sector size and number of sectors from the SD card. This information is used to calculate the total card capacity.

  3. Write raw data to the SD card.

  4. Read data from the SD card and compare with data written.

  5. The data previously written is erased by overwriting the data with 0.

FreeRTOS: