1.1.8.1 How the SFDP Library Works
The SFDP driver library is a single-client, single-instance based driver interface.
Abstraction Model
The SFDP driver interface provides read, write and Erase functions that abstract out the internal workings of the SFDP driver and the underlying QSPI/SQI/SPI protocol.
The client can be:
- Application - Directly access the JEDEC-Compliant NOR Flash using the APIs provided by the SFDP Driver library
- Memory Driver - Application can run a file system on the SFDP Flash by connecting it to the Memory Driver which can further be connected to the File System Service
Working Flow
- The SFDP Driver performs initialization and
puts the driver to ready state. This status of the driver can be checked using
DRV_SFDP_Status(). - The SFDP driver library performs a set of
Flash operations during
DRV_SFDP_Open()including SFDP discovery. If any of the below Flash operations fails, an invalid Handle will be returned. DRV_SFDP_Open() can be repeatedly called until it returns a valid handle.- Resets the Flash Device
- Discovers Flash parameters using SFDP (JESD216)
- Configures the Flash device to QUAD IO mode if supported
- Unlocks the Flash if it has been opened in write mode
- When the client requests for device geometry, it uses the SFDP-discovered parameters to populate the geometry table DRV_SFDP_GEOMETRY appropriately.
- The driver does not support queuing of more
than one request. 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_SFDP_TransferStatusGet().
