EasyManua.ls Logo

Cmsemicon CMS32L051 - Page 345

Default Icon
703 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
V1.2.2
CMS32L051 User Manual |Chapter 12 Universal Serial Communication Unit
www.mcu.com.cn 345 / 703
Figure 12-38 Flowchart of the master receive (continuous receive mode)
SSPI communication starts
configure receiving data
enable interrupt
write virtual data to
SIOp(=SDRmn[7:0])
wait till receiving ends
relevant initial configuration, refer to diagram
19~34(select buffer empty interrupt)
For the received data, set the storage area and the
number of communication data (through software,
arbitrarily set the storage area in the internal RAM, the
pointer of the received data and the number of
communication data).
after clear interrupt request flag(Ifxx) and
release interrupt mask(MKxx), enable
interrupt
output SCLKp signal (start
communicating) via writing
into SIOp.
if there are data to be received, read the
data and write into storage region, update
receive data pointer (communication data
count -1)
SCI initial configuration
buffer empty/transmit completion
interrupt
BFFmn=1
read receiving data to
SIOp(=SDRmn[7:0])
RETURN
communication data count =0?
disable interrupt (mask).
write STmn bit to 1.
communication completed.
Yes
No
No
Yes
main program
interrupt process program
main program
if transmission completion
interrupt occurs, jump to interrupt
process program.
communication data count -1
continue receiving?
write MDmn 0 bit to 1
if communication data count changes to 0, then
receiving completed.
communication data count
write MDmn 0 bit to 0
write virtual data to
SIOp(=SDRmn[7:0])
Yes
=0
2
=1
No
(1) to (8) in the note figure corresponds to (1) to (8) in the Figure 12-37.

Table of Contents

Related product manuals