EasyManuals Logo
Home>Renesas>Computer Hardware>RL78/G13

Renesas RL78/G13 Application Note

Renesas RL78/G13
40 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #9 background imageLoading...
Page #9 background image
RL78/G13 Handshake-based SPI Master Transmission/Reception
R01AN6883EJ0100 Rev.1.00 Page 9 of 38
June.15.23
(4) After initialization is completed, the master performs communication with the slave as shown in the
following steps.
The master waits in HALT mode for a 1-ms interval timer interrupt (INTTM03H).
When the master is released from HALT mode by an INTTM03 interrupt, it issues the CS signal to
select the slave that is specified in the g_slave_select_flag flag, and then waits for a response from
the slave.
When the BUSY signal goes low, the master proceeds to step 4. When a timeout is detected, the
master deselects the slave and proceeds to step 9.
The master transmits a status check command and receives the slave status. When a timeout is
detected, or the slave status cannot be received, the master deselects the slave and proceeds to step
9. When the slave status is received, the master deselects the CS
signal.
The master again waits in HALT mode for a 1-ms interval timer interrupt (INTTM03H).
When the master is released from HALT mode by an INTTM03 interrupt again, it issues the CS signal
to select the slave that is specified in the g_slave_select_flag flag, and then waits for a response from
the slave.
When the master detects that the BUSY signal goes low, it proceeds to step 8. When a timeout is
detected, the master deselects the slave and proceeds to step 9.
The master transmits and receives the number of data characters according to the status checked in
step 4. When a timeout is detected, the master deselects the slave.
The master changes the g_slave_select_flag flag to switch the target slave. These steps are
subsequently repeated from step 1.
(5) Commands
Each communication operation begins with the transmission of a 1-byte command. Table 1-4 lists the
command formats. The master transmits a status check command and receives the response from the slave
in the first slot of a communication sequence. The master Confirm that the number of data characters that
the target slave can transmit or receive is equal to or greater than the specified number of data characters to
be transmitted or received. Then, the master transmits/receives data for the specified number of data
characters to/from the slave.
Table 1-4 Command Formats
Command Code
Command Outline
Status check
00000000B
Checks the number of data characters that the slave can
transmit or receive. The following responses can be made by
the slave:
01xxxxxxB: The number of characters that the slave can
transmit is xxxxxxB.
00xxxxxxB: The number of characters that the slave can
receive is xxxxxxB.
Reception
01xxxxxxB
The master receives xxxxxxB bytes of data.
Transmission
10xxxxxxB
The master transmits xxxxxxB bytes of data.
Transmission/reception
11xxxxxxB
The master transmits and receives xxxxxxB bytes of data.

Other manuals for Renesas RL78/G13

Questions and Answers:

Renesas RL78/G13 Specifications

General IconGeneral
BrandRenesas
ModelRL78/G13
CategoryComputer Hardware
LanguageEnglish

Related product manuals