EasyManua.ls Logo

Cmsemicon CMS32L051 - Page 337

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 337 / 703
Figure 12-30 Flowchart of the master transmission (continuous transmit mode)
SSPI communication starts
transmit data
enable interrupt
write transmit data into
SIOp(=SDRmn[7:0])
wait transmission completes.
relevant initial configuration, refer to diagram 19~34
(select transmission completion interrupt)
configure transmission data and data count, clear communication completion flag
(via software, any configured internal RAM reserved region, transmit data pointer,
communication data count).
after clear interrupt request flag(Ifxx) and release interrupt mask(MKxx),
enable interrupt
output SDOp and SCLKp signal
(start communication) via writing
into SIOp.
If there are data to be transmitted, then read transmit data
from reserved region and write into SIOp, To update the
transmit data pointer and the number of transmit data, clear
the MDmn bit when the MDmn bit is "1". Otherwise, the
communication is terminated.
SCI initial configuration
buffer empty/transmit completion
interrupt
communication data count >0
write transmit data into
SIOp(=SDRmn[7:0])
RETURN
transmission completes
disable interrupt (mask).
set STmn bit to 1.
communication completed.
set MDmn0 bit to 0.
Yes
No
No
Yes
main program
Interrupt handler
main program
from reserved region read and transmit data
and write to SIOp, update transmit data pointer
if transmission completion interrupt occurs, jump to
interrupt process program.
communication data count-1 set communication completion flag
MDmn=1?
Yes
No
continue communicating?
write MDmn 0 bit to 1
check whether transmission completed via
confirming communication completion flag.
Remark (1) to (6) in the note figure corresponds to (1) to (6) in the Figure 12-29.

Table of Contents

Related product manuals