English
Language : 

SH7065 Datasheet, PDF (587/941 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperH RISC engine Family/SH7000 Series
Section 14 Serial Communication Interface (SCI)
Initialization
Start of reception
1
1. SCI initialization:
See figure 14.4, Sample SCI
Initialization Flowchart.
2. Receive error handling and break
detection:
Read BRK, DR, and ER bits
in SC2SSR
2
Read the BRK, DR, and ER bits in
SC2SSR to check whether a receive
error has occurred.
Yes
BRK ∨ DR ∨ ER = 1?
No
Error handling
If a receive error occurs, read the
ORER, PER3 to 0, and FER3 to 0 flags
in SC1SSR, and the DR and BRK flags
in SC2SSR to identify the error. After
performing the appropriate error
handling, ensure that the ORER, BRK,
DR, and ER bits are all cleared to 0.
Read RDF flag in SC1SSR 3
No
RDF = 1?
Yes
Read receive data from SCFRDR,
and clear RDF flag to 0
4
in SC1SSR
Reception cannot be resumed if the
ORER bit is set to 1. The setting of the
EI bit in SC2SSR determines whether
reception is continued or halted when
either PER3 to 0 or FER3 to 0 is set to
1.
In the case of a framing error, a break
can be detected by reading the value of
the RxD pin.
3. SCI status check and receive data read :
No
All data received?
Yes
Clear RE bit to 0 in SCSCR
Read the serial status 1 register
(SC1SSR) and check that RDF = 1, then
read receive data from the receive FIFO
data register (SCFRDR) and clear the
RDF bit to 0. Transition of the RDF bit
from 0 to 1 can also be identified by
means of an RXI interrupt.
4. Serial reception continuation procedure:
End of reception
To continue serial reception, read at
least the receive trigger set number of
data bytes from SCFRDR, and write 0 to
the RDF flag after reading 1 from it. The
number of receive data bytes in
SCFRDR can be ascertained by reading
the lower 8 bits of the FIFO data count
register (SCFDR). (The RDF bit is
cleared automatically when the DMAC is
activated by an RXI interrupt and the
SCFRDR value is read.)
Figure 14.7 Sample Serial Reception Flowchart (1)
Rev. 5.00 Sep 11, 2006 page 565 of 916
REJ09B0332-0500