Figure 12.12 Sample Flowchart For Receiving Multiprocessor Serial Data - Hitachi H8/3062 Hardware Manual

Single-chip microcomputer h8/3062 series; h8/3062b series; h8/3062f-ztat series; h8/3064f-ztat series
Hide thumbs Also See for H8/3062:
Table of Contents

Advertisement

Start receiving
Set MPIE bit to 1 in SCR
Read ORER and FER flags
FER∨ORER= 1
Read RDRF flag in SSR
No
Read RDRF flag in SSR
No
Read ORER and FER flags
FER∨ORER= 1
Read RDRF flag in SSR
Read receive data from RDR
No
Finished receiving?
Clear RE bit to 0 in SCR

Figure 12.12 Sample Flowchart for Receiving Multiprocessor Serial Data

404
(1)
Initialize
(2)
in SSR
Yes
No
(3)
RDRF= 1
Yes
Own ID?
Yes
in SSR
Yes
No
No
RDRF= 1
Yes
Error handling
Yes
(continued on next page)
<End>
(1)
SCI initialization:
the receive data input function of the
RxD pin is selected automatically.
(2)
ID receive cycle:
set the MPIE bit to 1 in SCR.
(3)
SCI status check and ID check:
read SSR, check that the RDRF flag
is set to 1, then read data from RDR
and compare it with the processor's
own ID. If the ID does not match, set
the MPIE bit to 1 again and clear the
RDRF flag to 0. If the ID matches,
clear the RDRF flag to 0.
(4)
SCI status check and data receiving:
read SSR, check that the RDRF flag
is set to 1, then read data from RDR.
(5)
Receive error handling and break
detection:
if a receive error occurs, read the
ORER and FER flags in SSR to
identify the error. After executing the
necessary error handling, clear the
ORER and FER flags both to 0.
Receiving cannot resume while either
the ORER or FER flag remains set to
1. When a framing error occurs, the
RxD pin can be read to detect the
break state.
(4)
(5)

Advertisement

Table of Contents
loading

Table of Contents