1.10 FILEX Filesystem using SDMMC Media
This application shows an example of using the FILEX File System to access and modify the contents of a SD card using the SDMMC driver.
Description
File System Operations on the SD Card:
- Application creates a file named newfile.txt in the root directory of the SD card and writes “FILEX filesystem demo using SD CARD Media” string into file
- Application reads file named newfile.txt and 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 Filesystem
- 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 | MPLABX 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 micro-SD 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.txt has the app data “FILEX
filesystem demo using SD CARD Media” written in itRefer 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 your host PC
- SD Card should have the file newfile.txt and should have “FILEX filesystem demo using SD CARD Media” string