15 Quad Synchronous Serial Interface (QSPI)
S1C31D50/D51 TECHNICAL MANUAL
Seiko Epson Corporation
15-25
(Rev. 2.00)
Table 15.5.6.1 DMA Data Structure Configuration Example
(for 32-bit Sequential Read in Memory Mapped Access Mode)
Item
Setting example
End pointer Transfer source
External Flash memory transfer start address
Transfer destination Memory area start address from which the read data are stored
Control data dst_inc
0x2 (+4)
dst_size
0x2 (word)
src_inc
0x2 (+4)
src_size
0x2 (word)
R_power
0x0 (arbitrated for every transfer)
n_minus_1
Number of receive data
cycle_ctrl
0x1 (basic transfer)
The following shows an example of the control procedure including the DMA controller operations:
1. Configure the primary data structure for the DMA channel (Ch.
x
) as shown in Table 15.5.6.1.
2. Enable the DMA channel using the DMA controller register.
3. Clear the channel request mask for the DMA channel using the DMA controller register.
4. Clear the DMA transfer completion interrupt flag using the DMA controller register.
5. Enable the DMA transfer completion interrupt of the DMA channel using the DMA controller register.
6. Clear pending DMA interrupts in the CPU core.
7. Enable pending DMA interrupts in the CPU core.
8. Enable the QSPI to issue DMA transfer requests to the DMA channel using the QSPI_
n
FRLDMAEN.
FRLDMAEN
x
bit.
9. Issue a software DMA transfer request to the DMA channel by setting the DMA controller register. This
operation is required to kickstart the first data fetching.
10. Wait for a DMA interrupt.
11. Disable DMA requests to be sent to the DMA channel using the QSPI_
n
FRLDMAEN.FRLDMAEN
x
bit.
12. Set the channel request masks for the DMA channel using the DMA controller register.
13. Disable the DMA channels using the DMA controller register.
15.5.7 Terminating Memory Mapped Access Operations
A procedure to terminate memory mapped access operations is shown below.
1. Write 0 to the QSPI_
n
MMACFG2.MMAEN bit. (Disable memory mapped access mode)
The slave select signal is negated. Note that the slave signal control via software is disabled by the state ma-
chine in memory mapped access mode.
2. Wait until the QSPI_
n
INTF.MMABSY bit is set to 0 (memory mapped access operation not busy).
15.5.8 Terminating Data Transfer in Master Mode
A procedure to terminate data transfer in master mode is shown below.
1. Wait for an end-of-transmission interrupt (QSPI_
n
INTF.TENDIF bit = 1).
2. Set the QSPI_
n
CTL.MODEN bit to 0 to disable the QSPI Ch.
n
operations.
3. Stop the 16-bit timer to disable the clock supply to QSPI Ch.
n
.