Skip to content

Latest commit

 

History

History
56 lines (31 loc) · 2.32 KB

File metadata and controls

56 lines (31 loc) · 2.32 KB

Fx_File_Edit_Standalone Application Description

This application provides an example of FileX stack usage on STM32L562E-DK board, running in standalone mode (without ThreadX). It demonstrates how to create a Fat File system on the SD card memory using FileX API.

The application is designed to execute file operations on the SD card, it provides all required software code for properly managing it.

The application's main calls the MX_FileX_Init() function in order to Initialize FileX, format the SD memory as FAT and open the sdio_disk driver. The resulting file system is a FAT32 compatible, with 512 bytes per sector.

Upon successful opening of the created SDIO-Disk media, FileX continues with creating a file called "STM32.TXT" into the root directory by calling MX_FileX_Process(void) function, then writes into it some predefined data. The file is re-opened in read only mode and content is checked.

As stated earlier, the present application runs in standalone mode without ThreadX, for this reason, the standalone variant of fileX is used, plus the following flags need to be set in fx_user.h:

  • #define FX_SINGLE_THREAD
  • #define FX_STANDALONE_ENABLE

Expected success behavior

  • A file named STM32.TXT should be visible in the root directory of the SD card.
  • A blinking green LED light marks the success of the file operations.

Error behaviors

  • On failure, the LED_RED should start blinking.
  • Error handler is called at the spot where the error occurred.

Assumptions if any

None.

Known limitations

No SD card insertion/removal mechanisms are implemented.

Notes

  1. Before starting the application, the SD card should be present in the SD card connector and formatted initially by user.

Keywords

FileX, File system, SDMMC, FAT32

Hardware and Software environment

  • This application runs on STM32L562xx devices without security enabled (TZEN=0).
  • This application has been tested with STMicroelectronics STM32L562E-DK boards Revision: MB1373C. and can be easily tailored to any other supported device and development board.

How to use it ?

In order to make the program work, you must do the following :

  • Open your preferred toolchain
  • Rebuild all files and load your image into target memory
  • Run the application