Enhanced Serial Communication Interface (eSCI)
MPC5565 Microcontroller Reference Manual, Rev. 1.0
20-22
Freescale Semiconductor
20.4.4.1
Transmitter Character Length
The eSCI transmitter can accommodate either 8-bit or 9-bit data characters. The state of the M bit in eSCI
control register 1 (ESCI
x
_CR1) determines the length of data characters. When transmitting 9-bit data, bit
T8 in the eSCI data register (ESCI
x
_DR) is the ninth bit (bit 8).
20.4.4.2
Character Transmission
To transmit data, the MCU writes the data bits to the eSCI data register (ESCI
x
_DR), which in turn are
transferred to the transmit shift register. The transmit shift register then shifts a frame out through the TXD
signal, after it has prefaced them with a start bit and appended them with a stop bit. The eSCI data register
(ESCI
x
_DR) is the buffer (write-only during transmit) between the internal data bus and the transmit shift
register.
The eSCI also sets a flag, the transmit data register empty flag (TDRE), every time it transfers data from
the buffer (ESCI
x
_DR) to the transmit shift register. The transmit driver routine can respond to this flag
by writing another byte to the transmitter buffer (ESCI
x
_DR), while the shift register is still shifting out
the first byte.
To initiate an eSCI transmission:
1. Configure the eSCI:
a) Turn on the module by clearing ESCI
x
_CR2[MDIS] if this bit is set.
b) Select a baud rate. Write this value to the eSCI control register 1 (ESCI
x
_CR1) to start the baud
rate generator. Remember that the baud rate generator is disabled when the ESCI
x
_CR1[SBR]
field is zero. When using 8-bit writes, writes to the ESCI
x
_CR1[0–7] have no effect without
also writing to ESCI
x
_CR1[8–15].
c) Write to ESCIx_CR1 to configure word length, parity, and other configuration bits
(LOOPS, RSRC, M, WAKE, ILT, PE, PT).
d) Enable the transmitter, interrupts, receive, and wake-up as required, by writing to the
ESCI
x
_CR1 register bits (TIE, TCIE, RIE, ILIE, TE, RE, RWU, SBK). A preamble or idle
character is shifted out of the transmitter shift register.
NOTE
A single 32-bit write to ESCI_CR1 can be used to perform steps b–d above.
2. Transmit procedure for each byte:
a) Poll the TDRE flag by reading the ESCI
x
_SR or responding to the TDRE interrupt. Keep in
mind that the TDRE bit resets to 1.
b) If the TDRE flag is set, software should then clear it, followed by writing the data to be
transmitted to ESCIx_DR, where the ninth bit is
written to the T8 bit in ESCIx_DR if the eSCI is in 9-bit data format.
3. Repeat step 2 for each subsequent transmission.
Содержание MPC5565
Страница 18: ...MPC5565 Microcontroller Reference Manual Devices Supported MPC5565 MPC5565 RM Rev 1 0 09 2007...
Страница 34: ...MPC5565 Reference Manual Rev 1 0 Freescale Semiconductor 15...
Страница 35: ...MPC5565 Reference Manual Rev 1 0 16 Freescale Semiconductor...
Страница 325: ...Error Correction Status Module ECSM MPC5565 Microcontroller Reference Manual Rev 1 0 8 16 Freescale Semiconductor...
Страница 515: ...External Bus Interface EBI MPC5565 Microcontroller Reference Manual Rev 1 0 12 70 Freescale Semiconductor...
Страница 553: ...Flash Memory MPC5565 Microcontroller Reference Manual Rev 1 0 13 38 Freescale Semiconductor...
Страница 559: ...SRAM MPC5565 Microcontroller Reference Manual Rev 1 0 14 6 Freescale Semiconductor...
Страница 577: ...Boot Assist Module BAM MPC5565 Microcontroller Reference Manual Rev 1 0 15 18 Freescale Semiconductor...
Страница 895: ...Deserial Serial Peripheral Interface DSPI MPC5565 Microcontroller Reference Manual Rev 1 0 19 72 Freescale Semiconductor...
Страница 973: ...Preface MPC5565 Microcontroller Reference Manual Rev 1 0 21 36 Freescale Semiconductor...
Страница 1145: ...MPC5565 Register Map MPC5565 Microcontroller Reference Manual Rev 1 0 A 60 Freescale Semiconductor...
Страница 1153: ...Calibration MPC5565 Microcontroller Reference Manual Rev 1 0 B 8 Freescale Semiconductor...