![Freescale Semiconductor ColdFire MCF5211 Скачать руководство пользователя страница 355](http://html1.mh-extra.com/html/freescale-semiconductor/coldfire-mcf5211/coldfire-mcf5211_reference-manual_2330619355.webp)
UART Modules
MCF5213 ColdFire® Integrated Microcontroller Reference Manual, Rev. 3
Freescale Semiconductor
21-25
21.4.5
Bus Operation
This section describes bus operation during read, write, and interrupt acknowledge cycles to the UART
module.
21.4.5.1
Read Cycles
The UART module responds to reads with byte data. Reserved registers return zeros.
21.4.5.2
Write Cycles
The UART module accepts write data as bytes only. Write cycles to read-only or reserved registers
complete normally without an error termination, but data is ignored.
21.5
Initialization/Application Information
The software flowchart,
, consists of the following:
•
UART module initialization—These routines consist of SINIT and CHCHK (See Sheet 1 p. 21-28
and Sheet 2 p. 21-29). Before SINIT is called at system initialization, the calling routine allocates
2 words on the system FIFO. On return to the calling routine, SINIT passes UART status data on
the FIFO. If SINIT finds no errors, the transmitter and receiver are enabled. SINIT calls CHCHK
to perform the checks. When called, SINIT places the UART in local loop-back mode and checks
for the following errors:
— Transmitter never ready
— Receiver never ready
— Parity error
— Incorrect character received
•
I/O driver routine—This routine (See Sheet 4 p. 21-31 and Sheet 5 p. 21-32) consists of INCH, the
terminal input character routine which gets a character from the receiver, and OUTCH, which
sends a character to the transmitter.
•
Interrupt handling—This consists of SIRQ (See Sheet 4 p. 21-31), which is executed after the
UART module generates an interrupt caused by a change-in-break (beginning of a break). SIRQ
then clears the interrupt source, waits for the next change-in-break interrupt (end of break), clears
the interrupt source again, then returns from exception processing to the system monitor.
21.5.1
Interrupt and DMA Request Initialization
21.5.1.1
Setting up the UART to Generate Core Interrupts
The list below gives the steps needed to properly initialize the UART to generate an interrupt request to
the core. See
Section 12.3.6.1, “Interrupt Sources,”
for details on interrupt assignments for the UART
modules.
1. Initialize the appropriate ICR
x
register in the interrupt controller.
2. Unmask appropriate bits in IMR in the interrupt controller.
Содержание ColdFire MCF5211
Страница 48: ...Overview MCF5213 ColdFire Integrated Microcontroller Reference Manual Rev 3 1 14 Freescale Semiconductor...
Страница 158: ...Reset Controller Module MCF5213 ColdFire Integrated Microcontroller Reference Manual Rev 3 9 10 Freescale Semiconductor...
Страница 218: ...Edge Port Module EPORT MCF5213 ColdFire Integrated Microcontroller Reference Manual Rev 3 13 8 Freescale Semiconductor...
Страница 234: ...DMA Controller Module MCF5213 ColdFire Integrated Microcontroller Reference Manual Rev 3 14 16 Freescale Semiconductor...
Страница 378: ...I2 C Interface MCF5213 ColdFire Integrated Microcontroller Reference Manual Rev 3 22 16 Freescale Semiconductor...
Страница 468: ...FlexCAN MCF5213 ColdFire Integrated Microcontroller Reference Manual Rev 3 25 30 Freescale Semiconductor...