15-81
15
MSM66591/ML66592 User's Manual
Chapter 15 Serial Port Functions
[2]
4-Stage Buffer Mode
The 4-stage buffer mode is entered by setting SRnEXP (bit 3) of SRnCON. During the
4-stage buffer mode, consecutive reception of up to a maximum of 4 bytes is possible.
After 4 bytes are received, they can be collectively processed by an interrupt.
<4-Stage Buffer Mode with UART Reception: SCI0 Example>
During the 4-stage buffer mode, the receive buffers form a ring buffer configuration. At
the completion of each 1-byte reception, the contents of the receive register (receive
data) are transferred to a receive buffer in the order of S0BUF0, S0BUF1, S0BUF2,
S0BUF3, S0BUF0, etc. Therefore, data is received up to the S0BUFn receive buffer
(where n = 0 to 3). After processing that data, if reception is continued, data is received
beginning from the S0BUF(n + 1) buffer.
For example, after receiving data up to S0BUF1 and processing that data, the next data
reception begins with S0BUF2. Or, after receivingdata up to S0BUF3 and processing
that data, the next data reception begins with S0BUF0.
After receiving data up to S0BUFn and processing that data, if it is desired to receive m
consecutive bytes (m
≤
4) of data and then process that data by an interrupt, since an
interrupt will be generated after data is received in the S0BUF(n + 1) through S0BUF(n
+ m) buffers, enable interrupt requests for S0BUF(n + m), the last buffer to receive data,
and then receive the data.
For example, after completing processing up to S0BUF2, if it is desired to receive 3
consecutive bytes of data and then process that data by an interrupt, since the 3 bytes
of data will be received in the order of S0BUF3, S0BUF0, and S0BUF1, enable interrupt
generation only for S0BUF1, the last buffer to receive data, and then begin the data
reception. To enable interrupt generation for S0BUF1, set RV0IE1 (SCI0 receive
interrupt enable flag) of SR0INT to "1". In this case, after reception is completed for
S0BUF3 through S0BUF1, an SCI0 receive complete interrupt request is generated,
and the SCI0 receive interrupt request flags (RV0IRQ1 of SR0INT and QSCI0 of
IRQ1L) are set.
Because a parity error flag, multiprocessor communication flag and overrun error flag
are provided for each receive buffer (4 bits in total), data reception errors can be
verified by reading the error flags that correspond to buffers. The framing error flag
consists of 1 bit. If a framing error occurs even in just 1 byte of the received data, the
framing error flag will be set to "1" at that time.
If 5 or more bytes of data are consecutively received, new data will overwrite the pre-
vious data, beginning with the receive buffer that received the first data. At that time, if
the data transferred to the receive buffer during the previous receive operation has not
been read by the CPU, the overrun error flag of each receive buffer will be set to "1".
After a framing or other error has occurred, read BFCU00 (bit 4) and BFCU01 (bit 5) of
S0STAT2 to verify which receive buffer will data be transferred to at the completion of
the next reception.
Receive timing in 1 frame of the 4-stage buffer mode is controlled in the same manner
as reception in the single buffer mode.
SCI2, SCI3 and SCI4 also operate in the same manner.
Figure 15-36 shows a timing example of the 4-stage buffer mode with UART reception.
Содержание MSM66591
Страница 1: ...MSM66591 ML66592 User s Manual CMOS 16 bit microcontroller FEUL66591 66592 01 Issue Date Mar 4 2002...
Страница 15: ...Contents 12...
Страница 17: ......
Страница 18: ...Overview Chapter 1 1...
Страница 19: ......
Страница 30: ...Description of Pins Chapter 2 2...
Страница 31: ......
Страница 44: ...CPU Architecture Chapter 3 3...
Страница 45: ......
Страница 101: ...3 56 MSM66591 ML66592User sManual Chapter 3 CPU Architecture...
Страница 102: ...CPU Control Functions Chapter 4 4...
Страница 103: ......
Страница 111: ...4 8 MSM66591 ML66592User sManual Chapter 4 CPU Control Functions...
Страница 112: ...Memory Control Functions Chapter 5 5...
Страница 113: ......
Страница 117: ...5 4 MSM66591 ML66592User sManual Chapter 5 Memory Control Functions...
Страница 118: ...Port Functions Chapter 6 6...
Страница 119: ......
Страница 152: ...Output Pin Control Pin OE Chapter 7 7...
Страница 153: ......
Страница 155: ...7 2 MSM66591 ML66592User sManual Chapter 7 Output Pin Control Pin OE...
Страница 156: ...Clock Generation Circuit Chapter 8 8...
Страница 157: ......
Страница 160: ...Time Base Counter TBC Chapter 9 9...
Страница 161: ......
Страница 164: ...Watchdog Timer WDT Chapter 10 10...
Страница 165: ......
Страница 170: ...Flexible Timer FTM Chapter 11 11 11...
Страница 171: ......
Страница 213: ...11 42 MSM66591 ML66592User sManual Chapter 11 Flexible Timer FTM...
Страница 214: ...General Purpose 8 Bit Timer Function Chapter 12 12...
Страница 215: ......
Страница 223: ...12 8 MSM66591 ML66592User sManual Chapter 12 General Purpose 8 Bit Timer Function...
Страница 224: ...PWM Functions Chapter 13 13...
Страница 225: ......
Страница 244: ...Baud Rate Generator Functions Chapter 14 14...
Страница 245: ......
Страница 263: ...14 18 MSM66591 ML66592User sManual Chapter 14 Baud Rate Generator Functions...
Страница 264: ...Serial Port Functions Chapter 15 15...
Страница 265: ......
Страница 348: ...A D Converter Functions Chapter 16 16...
Страница 349: ......
Страница 381: ...16 32 MSM66591 ML66592User sManual Chapter 16 A D Converter Functions...
Страница 382: ...Transition Detector Functions Chapter 17 17...
Страница 383: ......
Страница 387: ...17 4 MSM66591 ML66592User sManual Chapter 17 Transition Detector Functions...
Страница 388: ...Peripheral Functions Chapter 18 18...
Страница 389: ......
Страница 392: ...External Interrupt Request Function Chapter 19 19...
Страница 393: ......
Страница 396: ...Interrupt Request Processing Function Chapter 20 20...
Страница 397: ......
Страница 407: ...20 10 MSM66591 ML66592User sManual Chapter 20 Interrupt Request Processing Function...
Страница 408: ...Bus Port Functions Chapter 21 21...
Страница 409: ......
Страница 413: ...21 4 MSM66591 ML66592User sManual Chapter 21 Bus Port Functions...
Страница 414: ...Expansion Port Chapter 22 22...
Страница 415: ......
Страница 420: ...Serial Port with FIFO SCI5 Chapter 23 23...
Страница 421: ......
Страница 431: ...23 10 MSM66591 ML66592User sManual Chapter 23 Serial Port with FIFO SCI5...
Страница 432: ...RAM Monitor Function Chapter 24 24...
Страница 433: ......
Страница 441: ...24 8 MSM66591 ML66592User sManual Chapter 24 RAM Monitor Function...
Страница 442: ...25 Electrical Characteristics Chapter 25...
Страница 443: ......
Страница 458: ...Package Dimensions Chapter 26 26...
Страница 459: ......
Страница 461: ...26 2 MSM66591 ML66592User sManual Chapter 26 Package Dimensions...
Страница 462: ...Revision History Chapter 27 27...
Страница 463: ......
Страница 465: ...27 2 MSM66591 ML66592User sManual Chapter 27 Revision History...