This document explains about the hardware and software setup, which is required to interface the SDHC memory card to the EV-COG-AD3029LZ through SPI Interface.
The hardware details covers the pin mapping between the SDHC memory card and EV-COG-AD3029LZ along with useful links that provides more details for EV-COG-AD3029LZ and SDHC memory card . The software details covers the software development kit required to interface the SDHC memory card with EV-COG-AD3029LZ and the software architecture.
2. Insert the SDHC card into the SDHC slot (P2) of the expander gear as shown in the figure below.
A modular implementation of FatFs library called Elm-Chan FatFs library is provided for using SD card with Fat file system
The example software provided consists of these packs
* The index of API’s provided by Elm-Chan’s FatFs C library and their description can be found in this Link
* The driver version used is → ADuCM302x-Rel1.0.6
The software architecture for the SDHC application along with the FATFS is depicted below.
The Application level software handles file management tasks such as create, read /write ,edit files.
The Files in the FSFAT folder provides the Elm-Chan FATFS API calls. The files under HAL folder provides the SPI interface port for the ADuCM3029 Controller.
If raw read/write access to SD card at sector level is needed in the user application without the FATFS then the user can only use the files in HAL folder.
To do the above, remove the static keyword from the declaration and definition of the functions that the user needs to use from the SD.C and SD.h files. After doing the changes user can add SD.h in their application code.