1.10 FILEX File System Using SDMMC Media
This application shows an example of using the FILEX File System to access and modify the contents of an SD card using the SDMMC driver.
Description
File System Operations on the SD Card
- Application creates a file
named
newfile.txtin the root directory of the SD card and writesFILEX filesystem demo using SD CARD Mediastring into file - Application reads file named
newfile.txtand stores its content into memory buffer - Then read memory buffer is compared with the string that was written to the file. If the string compare is successful, an LED indication is provided.
- During execution, the application performs following file system related
operations:
- SYS_FS_DriveFormat
- SYS_FS_Mount
- SYS_FS_CurrentDriveSet
- SYS_FS_FileDirectoryRemove
- SYS_FS_FileOpen
- SYS_FS_FileWrite
- SYS_FS_FileSeek
- SYS_FS_FileRead
- SYS_FS_FileStat
- SYS_FS_FileEOF
- SYS_FS_FileSize
- SYS_FS_FileClose
- SYS_FS_Unmount
File System Layer Uses
- FILEX File System
- SDMMC Driver to communicate to SD card
Downloading and Building the Application
To clone or download this application from GitHub, go to the main page of this repository and then click Clone button to clone this repository or download as zip file. This content can also be downloaded using content manager by following these instructions.
Path of the application within the repository is apps/fs/sdmmc_filex/firmware.
To build the application, refer to the following table and open the project using its IDE.
| Project Name | Description |
|---|---|
| sam_e54_xpro.X | MPLAB X project for SAM E54 Xplained Pro Evaluation Kit |
Setting Up the Hardware
The following table shows the target hardware for the application projects.
| Project Name | Description |
|---|---|
| sam_e54_xpro.X | SAM E54 Xplained Pro Evaluation Kit |
Setting Up SAM E54 Xplained Pro Evaluation Kit
- To run this application,
following additional hardware is required:
- One microSD card
- Connect the Debug USB port on the board to the computer using a micro USB cable
Running the Application
- Build and program the application using its IDE.
- Insert the SD card in the SD card slot of the device.
- The LED is turned ON when the
File
newfile.txthas the app dataFILEX filesystem demo using SD CARD Mediawritten in it.Refer to the following table for LED name:Board LED Name SAM E54 Xplained Pro Evaluation Kit LED0 - If LED is ON, insert the SD card on to the host PC.
- SD card should have the file
newfile.txtand should haveFILEX filesystem demo using SD CARD Mediastring.
