/
Implementation

Implementation

TLDR: FATFS middleware will be connected and its functions will be further abstracted to allow use in state machines and central ZP applications.

Reference: Tutorial: An SD card over SPI using STM32CubeIDE and FatFS

Architecture:

In order to link an SD card with our state machine application, FATFS middleware would need to be attached to both ends of the architecture. A user-specified driver included in the reference webpage will be used to attach FATFS to the HAL library.

After implementing the architecture in the webpage, further abstraction can be done when attaching the SD driver to the state machines. Mainly, mounting and dismounting the file system, opening and closing files, reading and writing to files, creating and deleting files, and manipulating directories. These FATFS functions can be abstracted further to enable easier use in the state machines.

 

Related content

Laminar OS
More like this
LaminarOS Repo Structure
LaminarOS Repo Structure
Read with this
LOS_Storage & LOS_Logging Design + Impl.
LOS_Storage & LOS_Logging Design + Impl.
More like this
SD Card Logging
More like this
SDMMC SD Card
More like this
Storage Device Interface
Storage Device Interface
More like this