Hitachi SH7032 Hardware Manual page 413

Superh risc engine
Table of Contents

Advertisement

Transmitting Serial Data (Asynchronous Mode): Figure 13.5 shows a sample flowchart for
transmitting serial data. The procedure for transmitting serial data is as follows:
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.
4. To output a break signal at the end of serial transmission: set the DR bit to 0, then clear TE to 0
in SCR and set the TxD pin function as output port with the PFC.
378
Start of initialization
Clear TE and RE bits to 0 in SCR
Select communication format in SMR
Set value in BRR
Set CKE1 and CKE0 bits in SCR
(leaving TE and RE cleared to 0)
1-bit interval elapsed?
Set TE or RE to 1 in SCR; Set RIE,
TIE, TEIE, and MPIE as necessary
Figure 13.4 Sample Flowchart for SCI Initialization
Wait
No
Yes
End
(1)
(2)
(3)
(4)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents