AM263x MCU+ SDK  08.02.01
QSPI

The Quad Serial Peripheral Interface (QSPI) module is a kind of Serial Peripheral Interface (SPI) module which allows single, dual or quad read access to external flash devices. The QSPI module is used to transfer data, either in a memory mapped mode (for example a processor wishing to execute code directly from external flash memory), or in an configuration mode where the module is set-up to silently perform some requested operation, signaling its completion via interrupts or status registers.

Features Supported

  • Support for single, dual or quad read operation.
  • Programmable signal polarities
  • Programmable active clock edge
  • Programmable delay between chip select activation and output data from 0 to 3 QSPI clock cycles

SysConfig Features

Note
It is strongly recommend to use SysConfig where it is available instead of using direct SW API calls. This will help simplify the SW application and also catch common mistakes early in the development cycle.
  • QSPI instance name
  • Input clock frequency to be used for QSPI module
  • Input clock divider which decides the baud-rate at which the flash will be read
  • Chip Select
  • Enabling DMA mode
  • In advanced config, you can choose various parameters like frame format, decoder chip select polarity, read dummy cycles etc

Features NOT Supported

  • Interrupt mode is not supported yet.
  • Dual and Quad writes are not supported.

Example Usage

Include the below file to access the APIs

#include <stdio.h>
#include <drivers/qspi.h>

Instance Open Example

QSPI_Params qspiParams;
QSPI_Params_init(&qspiParams);
gQspiHandle = QSPI_open(0, &qspiParams);
DebugP_assert(gQspiHandle != NULL);

Instance Close Example

QSPI_close(gQspiHandle);

API

APIs for QSPI

QSPI_Params_init
void QSPI_Params_init(QSPI_Params *qspiParams)
Initialize data structure with defaults.
qspi.h
QSPI_open
QSPI_Handle QSPI_open(uint32_t index, const QSPI_Params *openParams)
This function opens a given QSPI peripheral.
QSPI_Params
QSPI Parameters.
Definition: qspi/v0/qspi.h:254
DebugP_assert
#define DebugP_assert(expression)
Function to call for assert check.
Definition: DebugP.h:159
QSPI_close
void QSPI_close(QSPI_Handle handle)
Function to close a QSPI peripheral specified by the QSPI handle.