1.1.13.3.1 How the Library Works

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

Abstraction Model

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

The client can be:

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

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

drv_w25_abstraction_model

Working flow

  • The W25 Driver performs initialization and puts the driver to ready state. This status of the driver can be checked using DRV_W25_Status()

  • The W25 driver library performs set of flash operations during DRV_W25_Initialize()

    • Resets the Flash

    • 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_W25_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_W25_TransferStatusGet()