SDAA529 September   2026 MSPM33C321A

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Detailed Description
    1. 2.1 QSPI Controller Overview
    2. 2.2 Hardware Connection to External NOR Flash
    3. 2.3 Software Configuration
      1. 2.3.1 Driver Initialization and Flash Identification
      2. 2.3.2 Enabling Quad Mode and Programming the Flash
      3. 2.3.3 DMA-Based Quad Read
    4. 2.4 Measured Performance: Flash Read With SPI Streaming
    5. 2.5 Application Use Cases
      1. 2.5.1 Optical Modules
      2. 2.5.2 Display Applications
      3. 2.5.3 Audio Storage and Playback
  6. 3Summary
  7. 4References

Software Configuration

The MSP M33 SDK provides a QSPI flash driver (QSPI_FLASH.h) layered on top of the DriverLib QSPI module (DL_QSPI). The SDK example qspi_flash_readback_dma demonstrates the complete life cycle used in this application note: driver initialization, flash identification, quad-mode enablement, erase, DMA-based page program, and DMA-based quad read with verification.

The qspi_flash_readback_DMA example is provided in the MSP M33 SDK as a No-RTOS project with GCC, IAR, and TI Clang compiler variants. The project separates the reusable QSPI flash driver from the application:

Figure 2-1 QSPI_flash_readback_DMA Project Structure

NOR_FLASH_COMMANDS.h centralizes the flash-specific opcodes (read ID, write status, enable QPI, sector erase, page program, quad I/O read) and the dummy-cycle counts, so retargeting the example to a different NOR flash typically only requires editing this header against the new flash datasheet. QSPI_FLASH.c/.h implement the QSPIFLASH driver on top of DriverLib (DL_QSPI), and the .syscfg file generates the pin multiplexing, clock tree, and DMA channel configuration through SysConfig.

The example application executes the following sequence, checking the returned status after each step and latching an error flag on the first failure:

  1. Initialize the device (SYSCFG_DL_init), enable the QSPI interrupt, and bind the QSPIFLASH driver handle
  2. Read the JEDEC ID in SPI half-duplex mode to confirm the flash is present
  3. Set the QE bit in the flash status register, then enable the QPI mode
  4. Erase the target sector in QPI half-duplex mode
  5. Page program the test data with QSPIFLASH_writeDMA (automatic page-boundary handling)
  6. Read the data back with QSPIFLASH_readDMA using the quad I/O read command
  7. Disable the QPI mode and de-initialize the QSPI
  8. Verify the readback buffer word-for-word and report pass/fail on the Launchpad LEDs

The subsections below walk through the key steps of this flow with code excerpts from the example.