12-24
MSM66573 Family User's Manual
Chapter 12 Serial Port Functions
Receive settings
(1)
Port 8 mode register (P8IO)
If RXD1 (receive data input) is to be used, reset bit 0 (P8IO0) to "0" to configure that port
as an input. If the transmit clock is to be output externally (master mode), set bit 2 (P8IO2)
to "1" to configure that port as an output. If the transmit clock is to be input externally (slave
mode), reset bit 2 (P8IO2) to "0" to configure that port as an input.
(2)
Port 8 secondary function control register (P8SF)
Specify with bit 0 (P8SF0) whether the RXD1 pin will be pulled-up. If the transmit clock is
to be output externally (master mode), set bit 2 (P8SF2) to "1" to configure that port as a
secondary function output. If the transmit clock is to be input externally (slave mode),
specify with bit 2 (P8SF2) whether the input will be pulled-up.
(3)
SIO1 receive control register (SR1CON)
Set bit 0 (SR1MOD) to "1" to specify the mode to synchronous mode. Specify the receive
data length with bit 1 (SR1LN). Specify the master or slave mode with bit 3 (SR1SLV). With
bit 6 (RC1IE), specify whether interrupt requests are enabled or disabled when a receive
complete signal occurs. If bit 7 (SR1REN) is set to "1", reception is enabled and the
reception operation is performed when data arrives.
12.5.3.3 Baud Rate Generator (Timer 4) Settings
If overflow of timer 4 is selected for use as the baud rate clock, implement the following
settings.
(1)
General-purpose 8-bit timer 4 counter (TM4C)
Set the timer value that will be valid at the start of counting. When writing to TM4C, the same
value will also be simultaneously and automatically written to the general-purpose 8-bit
timer 4 register (TM4R).
(2)
General-purpose 8-bit timer 4 control register (TM4CON)
Bits 0 to 2 (TM4C0 to TM4C2) of this register specify the count clock for timer 4. If bit 3
(TM4RUN) is set to "1", timer 4 will begin counting. If reset to "0", timer 4 will halt counting.
[Equation to Calculate Baud Rate]
B = f(TM4) 1/(256 – D) 1/n
B : baud rate [bps]
f(TM4) : timer 4 input clock frequency [Hz]
D : reload value (0 to 255)
n : 16 for the UART mode
4 for the synchronous mode