Quad Synchronous Serial Interface (Qspi) - Epson S1C31D01 Software Manual

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

Advertisement

3.8 Quad Synchronous Serial Interface (QSPI)

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 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. Then software sets bus speed to 10000000.
3. Example software starts QSPI in Single mode.
4. Then software checks if it can read External Flash mode register correctly.
5. Then it reads Flash ID.
6. If the flash operations succeed following flash actions are taken consecutively for three QSPI modes:
- Quad mode Erase sector, Program Sector, Read and compare sector.
- Dual mode Erase sector, Program Sector, Read and compare sector.
- Single mode Erase sector, Program Sector, Read and Compare sector.
Example of Output
-CPU clock- seCLG_IOSC (20000000)
Get bus speed 77519
Set bus speed 10000000
Get bus speed 10000000
QSPI Start: OK
Read external flash register in SINGLE mode: OK
Manufacture ID: 20h, Device ID: ba18h
Set external flash in QUAD mode: OK
Set QSPI in QUAD mode.
Read external flash register in QUAD mode: OK
Erase flash sector in QUAD mode: OK
Program flash in QUAD mode: OK
Read flash in QUAD mode: OK
Compare R/W data in QUAD mode: OK
Set external flash in DUAL mode: OK
Set QSPI in DUAL mode.
Read external flash register in DUAL mode: OK
Erase flash sector in DUAL mode: OK
Program flash in DUAL mode: OK
Read flash in DUAL mode: OK
Compare R/W data in DUAL mode: OK
Set external flash in SINGLE mode: OK
Set QSPI in SINGLE mode.
Read external flash register in SINGLE mode: OK
S1C31D01 Peripheral Circuit
Sample Software Manual (Rev.3.00)
Seiko Epson Corporation
39

Advertisement

Table of Contents
loading

Table of Contents