The QSPI driver provides the interface to configure and use the QSPI peripheral.
The Serial Peripheral Interface (QSPI) circuit is a synchronous serial data link that provides communication with external devices in Master or Slave Mode.
To use the QSPI, the user has to follow these few steps:
- Enable the QSPI pins required by the application (see pio.h).
- Configure the QSPI using the QSPI_Configure(). This enables the peripheral clock. The mode register is loaded with the given value.
- Configure all the necessary chip selects with QSPI_ConfigureNPCS().
- Enable the QSPI by calling QSPI_Enable().
- Send/receive data using QSPI_Write() and QSPI_Read(). Note that QSPI_Read() must be called after QSPI_Write() to retrieve the last value read.
- Send/receive data using the PDC with the QSPI_WriteBuffer() and QSPI_ReadBuffer() functions.
- Disable the QSPI by calling QSPI_Disable().
For more accurate information, please look at the QSPI section of the Datasheet.
Related files :
qspi.c
qspi.h.