Quad Synchronous Serial Interface With Dma (Qspi_Dma) - Epson S1C31D01 Software Manual

Cmos 32-bit single chip microcontroller peripheral circuit sample software manual
Table of Contents

Advertisement

3.9 Quad Synchronous Serial Interface with DMA (QSPI_DMA)

QSPI module is a Quad Synchronous Serial Interface supporting both master and slave modes.
This example provides a description of how to use a QSPI channel with DMA in the master mode to
communicate with an external serial flash.
Hardware Setup
The micron flash on the evaluation board is used in this example.
Operations
1. The example code initializes the QSPI module in master mode as below:
- Data length is 8bit
- Data format is MSB first
- Use 16-bit timer T16_2 for baud rate generator.
2. The example code sets bus speed to 10000000.
3. Then it configures DMA Controller descriptors and init DMA Controller.
4. Example software starts QSPI in the register access Single mode.
5. Then software checks if it can read the External Flash mode register correctly.
6. Then it reads Flash ID.
7. If the flash operations succeed software performing following flash actions:
- Erase Sector
- Program Sector using register access DMA transfers.
- Read Sector using register access DMA transfers and compare with the programmed pattern.
8. The example software configures QSPI controller to Memory mapped mode.
9. At the end the example software reads a flash sector using memory mapped DMA transfers and compares it
with the previously programmed pattern.
Example of Output
-CPU clock- seCLG_IOSC (20000000)
Set bus speed 10000000
QSPI Start: OK
Set external flash in SINGLE mode: OK
Erase flash sector in SINGLE mode: OK
Program flash using DMA in Register Access SINGLE mode: OK
Read flash using DMA in Register Access SINGLE mode: OK
Compare R/W data in Register Access SINGLE mode: OK
Set external flash in QUAD mode: OK
QSPI Start: OK
Read flash using DMA in Memory Mapped QUAD mode: OK
Compare R/W data using DMA in Memory Mapped QUAD mode: OK
Exit
S1C31D01 Peripheral Circuit
Sample Software Manual (Rev.3.00)
Seiko Epson Corporation
41

Advertisement

Table of Contents
loading

Table of Contents