EasyManua.ls Logo

Cmsemicon CMS32L051 - Page 454

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 454 / 703
Figure 12-127 Flowchart of data reception
data reception
data reception completes.
wait for transission comppletion
(clear interrupt request flag)
generate stop condition
address field transmit
completes.
stop operation in order to modify
SCRmn register
set STmn bit to 1.
write "0" to TXEmn bit, write "1" to RXEmn bit
set SSmn bit to 1.
received last data?
write '0' to SOEmn bit
write virtual data (FFH) to
SIOr (SDRmn[7:0])
does transmission
completion interrupt
occur?
No
read SIOr(SDRmn[7:0])
No
data transmission
completes?
No
cofigure channel operation mode to
receiving
restart operation
disable outupt in order not to
acknowledge the last piece of data.
start receiving operation
read receiving data count, and
processing (store into RAM..etc)
Note ACK is not output when receiving the last data (NACK). Thereafter, operation is stopped by setting the STmn bit
of the serial channel stop register m (STm) to "1", and then a stop condition is generated to end communication.

Table of Contents

Related product manuals