Receive Operation In Uart Mode; Initialization For Uart Reception - Renesas M32R/ECU Series User Manual

Mitsubishi 32-bit risc single-chip microcomputers
Table of Contents

Advertisement

12

12.7 Receive Operation in UART Mode

12.7.1 Initialization for UART Reception

To receive data in UART mode, initialize the serial I/O following the procedure described below.
(1) Setting SIO Transmit/Receive Mode Register
• Set the register to UART mode.
• Set parity (when enabled, select odd/even).
• Set the stop bit length.
• Set the character length.
Note: • During UART mode, settings of the internal/external clock select bit have no effect (only the
internal clock is useful).
(2) Setting SIO Transmit Control Register
• Set the clock divider's divide-by ratio.
(3) Setting SIO Baud Rate Register
Set a baud rate generator value. (See Section 12.6.1, "Setting the UART Baud Rate.")
(4) Setting SIO interrupt related registers
• Select the source of receive interrupt request (reception finished or receive error) (Interrupt Request
Source Select Register).
• Enable or disable receive interrupts (Interrupt Request Enable Register).
(5) Setting Interrupt Controller
To use interrupts during reception, set their priority levels.
(6) Setting DMAC
To issue DMA transfer requests to the internal DMAC when reception has finished, set up the DMAC. (See
Chapter 9, "DMAC.")
(7) Selecting pin functions
Because the serial I/O related pins serve dual purposes, set the pin functions for use as SIO pins or input/
output ports. (See Chapter 8, "Input/Output Ports and Pin Functions.")
12.7 Receive Operation in UART Mode
12-48
SERIAL I/O
32180 Group User's Manual (Rev.1.0)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents