EasyManua.ls Logo

Cmsemicon CMS32L051 - Page 392

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 392 / 703
Figure 12-79 Flowchart of slave transmission (continuous send mode)
SSPI communication starts
configure transmit data
enable interrupt
write transmit data into
SIOp(=SDRmn[7:0])
wait transmission completes.
relevant intial configure, please refer to
diagram 19-79 (select buffer empty
interrupt)
regarding transmit data, configure storage region
and data count (via software, any specified internal
RAM storage region, transmit data pointer
communnication data count)
after clear interrupt request flag(Ifxx) and release interrupt
mask(MKxx), enable interrupt
start communication via clock
provided by master device.
if there is data to be transmitted, then read
data from storage region and write into SIOp,
update storage pointer. Else, changes
interrupt to transmission completion.
SCI initial configuration
buffer empty/transmit
completion interrupt
communication data count > 1?
write transmit data into
SIOp(=SDRmn[7:0])
RETURN
communication data count=-1
disable interrupt (mask).
set STmn bit to 1.
communication completed.
write MDmn 0 bit to 0
Yes
No
No
Yes
main program
interrupt process program
main program
from reserved region read and transmit data and write to
SIOp, update transmit data pointer
if buffer empty or transmit
completion interrupt occurs, jump to
interrupt process program.
read transmit data
continue communicating?
write MDmn 0 bit to 1
communication data count -1
Yes
No
perform following judgement based on
communication data count
+1: transmit data complete.
0: receiving last piece of data
-1: all data receive completed.
Note 1. (1) to (6) in the figure corresponds to (1) to (6) in Figure 12-78.
2.m: Unit number (m=0) n: Channel number (n=0) p: SSPI number (p=00).

Table of Contents

Related product manuals