English
Language : 

SH7727 Datasheet, PDF (673/1109 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperH RISC engine Family/SH7700 Series
Section 19 Serial Communication Interface with FIFO (SCIF)
19.5 Usage Notes
Note the following when using the SCIF.
1. SCFTDR2 Writing and the TDFE Flag: The TDFE flag in the serial status register 2 (SCSSR2)
is set when the number of transmit data bytes written in the transmit FIFO data register 2
(SCFTDR2) has fallen below the transmit trigger number set by bits TTRG1 and TTRG0 in
the FIFO control register 2 (SCFCR2). After TDFE is set, transmit data up to the number of
empty bytes in SCFTDR2 can be written, allowing efficient continuous transmission.
However, if the number of data bytes written in SCFTDR2 is less than or equal to the transmit
trigger number, the TDFE flag will be set to 1 again after being cleared to 0. The TDFE flag
should therefore be cleared to 0 after a number of data bytes exceeding the transmit trigger
number has been written to SCFTDR2.
The number of transmit data bytes in SCFTDR2 can be found from the upper 8 bits of the
FIFO data count set register 2 (SCFDR2).
2. SCFRDR2 Reading and the RDF Flag: The RDF flag in the serial status register 2 (SCSSR2)
is set when the number of receive data bytes in the receive FIFO data register 2 (SCFRDR2)
has become equal to or greater than the receive trigger number set by bits RTRG1 and RTRG0
in the FIFO control register 2 (SCFCR2). After RDF is set, receive data equivalent to the
trigger number can be read from SCFRDR2, allowing efficient continuous reception.
However, if the number of data bytes in SCFRDR2 exceeds the trigger number, the RDF flag
will be set to 1 again after being cleared to 0. The RDF flag should therefore be cleared to 0
when 1 has been written to RDF after all receive data has been read.
The number of receive data bytes in SCFRDR2 can be found from the lower 8 bits of the FIFO
data count set register 2 (SCFDR2).
3. Break Detection and Processing: Break signals can be detected by reading the RxD pin directly
when a framing error (FER) is detected. In the break state the input from the RxD pin consists
of all 0s, so the FER flag is set and the parity error flag (PER) may also be set. Note that,
although transfer of receive data to SCFRDR2 is halted in the break state, the SCIF receiver
continues to operate, so if the BRK flag is cleared to 0 it will be set to 1 again.
4. Sending a Break Signal: The I/O condition and level of the TxD pin are determined by the
SCP4DT bit in the port SC data register 2 (SCPDR2) and bits SCP4MD0 and SCP4MD1 in the
port SC control register 2 (SCPCR2). This feature can be used to send a break signal.
To send a break signal during serial transmission, clear the CP4DT bit to 0 (designating low
level), then set the SCP4MD0 and SCP4MD1 bits to 0 and 1, respectively, and finally clear the
TE bit to 0 (halting transmission). When the TE bit is cleared to 0, the transmitter is initialized
regardless of the current transmission state, and 0 is output from the TxD pin.
Rev. 5.00 Dec 12, 2005 page 601 of 1034
REJ09B0254-0500