This project demonstrates SD card access in two ways:
    1. via the FAT file system
    2. on the HCC Media Driver Interface

The demo is configured for use with the ADSP-SC573 EZ-Board equipped with the Analog Devices ADSP-SC573 MCU. The hardware configuration is shown below:

Procedure

  1. Connect the USB-UART connector to a host PC and open a terminal connection to the virtual serial port (115200@8N1).
  2. Insert an SD card into the on-board SD slot.
  3. Download and start the project.
  4. If DO_FAT_TEST in sdcard_rw\hcc\src\psp\board\demo\demo.c is set to 1, a complex file system test starts to run. Its results are printed to the terminal window.
  5. If DO_FAT_TEST in sdcard_rw\hcc\src\psp\board\demo\demo.c is set to 0, operation depends on the setting of DO_FAT_RW_TEST, as follows:
  • DO_FAT_RW_TEST = 1 - a continuous file open-write-close and open-read-close test is executed. The maximum and minimum throughput measured during the test are printed to the terminal window.
  • DO_FAT_RW_TEST = 0 - a continuous write/read test is executed over the Media Driver Interface. That is, SD card sectors are written/read directly. The maximum and minimum throughput measured during the test are printed to the terminal window.

By default 16 MBytes of data is written/read at once, both when DO_FAT_RW_TEST = 0 and when DO_FAT_RW_TEST = 1.

Additional macros

When  DO_FAT_TEST = 0 the following additional macros are available to modify test settings:

  • TEST_BUF_SIZE - the size of the read/write buffer used for the tests.
  • TEST_RW_SIZE - the size of the data chunk written to/read from a file. (This is only relevant when DO_FAT_RW_TEST=1.)
  • TEST_SECTOR_START - the start sector for the Media Driver Interface tests. (This is only relevant when DO_FAT_RW_TEST=0 .)
  • TEST_NUM_ITERATION_PER_DIRECTION - the number of iterations in one direction. For example, for the DO_FAT_RW_TEST=0 case, the test writes TEST_BUF_SIZE bytes, starting at TEST_SECTOR_START, this many times, then read the same amount of data from the same sectors this many times. The maximum and minimum throughput values printed during the test are always considered within the scope of the actual TEST_NUM_ITERATION_PER_DIRECTION iterations.

          
Note: This project was developed using CrossCore Embedded Studio v2.9.2.0.