Hitachi SH7032 Hardware Manual page 432

Superh risc engine
Table of Contents

Advertisement

Transmitting Serial Data (Synchronous Mode): Figure 13.17 shows a sample flowchart for
transmitting serial data. The procedure for transmitting serial data is listed below.
1. SCI initialization: select the TxD pin function with the PFC.
2. SCI status check and transmit data write: read the serial status register (SSR), check that the
TDRE bit is 1, then write transmit data in the transmit data register (TDR) and clear TDRE to
0.
3. To continue transmitting serial data: read the TDRE bit to check whether it is safe to write (1);
if so, write data in TDR, then clear TDRE to 0. When the DMAC is started by a transmit-data-
empty interrupt request (TXI) to write data in TDR, the TDRE bit is checked and cleared
automatically.
Figure 13.17 Sample Flowchart for Serial Transmitting
Initialize
Start transmitting
Read TDRE bit in SSR
TDRE = 1?
Yes
Write transmit data in TDR and
clear TDRE bit to 0 in SSR
All data transmitted?
Yes
Read TEND bit in SSR
TEND = 1?
Yes
Clear TE bit SCR to 0
Transmission ends
(1)
(2)
No
No
(3)
No
397

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents