RL78/G13 Handshake-based SPI Master Transmission/Reception
R01AN6883EJ0100 Rev.1.00 Page 30 of 38
June.15.23
5.6.12 CSI00 Transmit/Receive Processing
Figure 5-13 shows the flow of CSI00 Transmit/Receive Processing.
Figure 5-13 CSI00 Transmit/Receive Processing
←
←
←
g_csi00_tx_count = g_csi00_tx_count
-
1
Number of transmit data < 1?
Set status flag to indicate error
data counter
Set transmit data pointer
Set transmit data in
buffer register
Transmit data pointer + 1
counter – 1
Function return value: status
g_csi00_tx_count: Variable in RAM
[Argument] *tx_buf: Transmit data
tx_num: Number of transmit data
*rx_buf: Receive data
gp_csi00_tx_address: Variable in
RAM
gp_csi00_rx_address: Variable in
RAM