Terminating Data Transfer In Slave Mode - Epson Arm S1C31 Series Technical Manual

Cmos 32-bit single chip microcontroller
Table of Contents

Advertisement

• Data transmission/reception can be performed even in SLEEP mode, it makes it possible to wake the CPU up
using an SPIA interrupt.
Other operations are the same as master mode.
Notes: • If data of the number of bits specified by the SPIA_nMOD.CHLN[3:0] bits is received when
the SPIA_nINTF.RBFIF bit is set to 1, the SPIA_nRXD register is overwritten with the newly
received data and the previously received data is lost. In this case, the SPIA_nINTF.OEIF bit
is set.
• When the clock for the first bit is input from the SPICLKn pin, SPIA starts sending the data
currently stored in the shift register even if the SPIA_nINTF.TBEIF bit is set to 1.
#SPISSn
SPICLKn
SDOn
SDIn
SPIA_nINTF.TBEIF
SPIA_nINTF.RBFIF
Software operations
Figure 14.5.5.1 Example of Data Transfer Operations in Slave Mode (SPIA_nMOD.CHLN[3:0] bits = 0x7)
Data transmission
Read the SPIA_nINTF.TBEIF bit
SPIA_nINTF.TBEIF = 1 ?
YES
Write transmit data to
the SPIA_nTXD register
Transmit data remained?
NO
End

14.5.6 Terminating Data Transfer in Slave Mode

A procedure to terminate data transfer in slave mode is shown below.
1. Wait for an end-of-transmission interrupt (SPIA_nINTF.TENDIF bit = 1). Or determine end of transfer via the
received data.
2. Set the SPIA_nCTL.MODEN bit to 0 to disable the SPIA Ch.n operations.
S1C31D41 TECHNICAL MANUAL
(Rev. 1.1)
1 2 3
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
Data (W) → SPIA_nTXD
Data (W) → SPIA_nTXD
NO
YES
Wait for an interrupt request
(SPIA_nINTF.TBEIF = 1)
Figure 14.5.5.2 Data Transfer Flowcharts in Slave Mode
Seiko Epson Corporation
14 SYNCHRONOUS SERIAL INTERFACE (SPIA)
1 2 3 4 5 6 7 8
Data (W) → SPIA_nTXD
SPIA_nRXD → Data (R)
Data reception
Wait for an interrupt request
(SPIA_nINTF.RBFIF = 1)
Read receive data from
the SPIA_nRXD register
Receive data remained?
NO
End
SPIA_nRXD → Data (R)
YES
14-11

Advertisement

Table of Contents
loading

This manual is also suitable for:

Arm s1c31d41

Table of Contents