Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SD/MMC/SDIO Card Unit tests

Introduction

This is the unit test application for the SD/MMC stack. It consists of test cases for the following functionalities:

  • SD/MMC/SDIO card initialization.
  • SD/MMC/SDIO card read and write test. The SD/MMC stack supports all MCI/SPI interfaces from AVR and SAM devices.
Note
Please connect a SD/MMC card on the board before running the test. While using SAM4L Xplained Pro or SAM4L8 Xplained Pro, the IO1 Xplained Pro extension board should be attached to EXT1.

Description

The unit tests executes the following sequences:

  • Wait a card insertion on the first slot of the board
  • Inilialize an SD, MMC or SDIO card.
  • If the inserted card is an SD or MMC card, test read/write access. Three modes are tested: SINGLE, MULTIPLE block, and fragmented MULTIPLE block.
    • Read data from the card, save it
    • Write data into the card
    • Read data from the card
    • Verify the written data.
    • Write the data saved
    • Read the data saved
    • Verify the written data.
  • If the inserted card is a SDIO card:
    • Inilialize a SDIO card.
    • Read and write test on CIA.

The example outputs the information through the standard utput (stdio). To know the output used by the board, look in the conf_test.h file and connect a terminal on the correct port.

Contact Information

For further information, visit Microchip.
Support and FAQ: https://www.microchip.com/support/