Jump to main content

##

# 1.1.13.1.1 How the Library Works

The MX25L driver library is a single-client, single-instance based driver interface.

Abstraction Model

The MX25L driver interface provides read, write and Erase functions that abstract out the internal workings of the MX25L driver and the underlying QSPI protocol.

The client can be:

- Application - Directly access the MX25L Flash using the APIs provided by the MX25L Driver library

- Memory Driver - Application can run a file system on the MX25L Flash by connecting it to the Memory Driver which can further be connected to the File System Service

Working flow

- The MX25L Driver performs initialization and puts the driver to ready state. This status of the driver can be checked using DRV_MX25L_Status()

- The MX25L driver library performs set of flash operations during DRV_MX25L_Initialize()

  - Resets the Flash
  - Configures the flash device to QUAD IO Mode if underlying peripheral library is running in QSPI/SQI mode
  - Unlocks the flash if it has been opened in write mode

- When the client requests for device geometry, it queries for the JEDEC-Id and populates the geometry table DRV_MX25L_GEOMETRY appropriately.

- The driver does not support queuing of more than one requests. The application must check and ensure that any previous request is completed before submitting a new one. This can be done by polling the status of data transfer using DRV_MX25L_TransferStatusGet()