Asynchronous Serial Ports (UARTs)
Am186™CC/CH/CU Microcontrollers User’s Manual
13-21
13.5.8
Receive Special-Character Matching (High-Speed UART Only)
The High-Speed UART provides a method of generating interrupts on special characters.
Up to six special characters can be matched. Special-character matching is enabled by the
MEN bit in the HSPCON1 register.
The special characters are written by software into three 16-bit character match registers
(HSPM0, HSPM1, and HSPM2). When character matching is enabled with the MEN bit,
the incoming character is compared against all six special characters. Applications using
fewer than six special characters should program the extra compare registers with
duplicates of valid special characters, as the default 0 is considered a valid character.
If address bits are used, three bits (MAB0, MAB1, and MAB2) in the HSPCON1 register
must also be used, one for each special-character register. When the MAB bit and the
address enable (ABEN) bit are both set, a received character must have the address bit
set in order to match characters in the corresponding character match register. Both the
character and the address bit must match in order for a special character to be detected.
If address bit detection and generation is not enabled, the value of the address-match bit
is ignored during the comparison.
For 7-bit character matching, the High bit of each byte in the character match registers
should be cleared to zero. If address matching is enabled for 7-bit characters, the three
match-address bits in the control register are used to determine the match, not the High
bit of each byte in the character match register.
When a special character is detected, the Address Match Detected (MATCH) bit is set in
the status register. A maskable interrupt can be generated on this condition, using the
HSPIMSK register.
Special-character matching has several possible applications, including the following:
■
Use special character matching to implement software flow control using the XON/XOFF
protocol.
■
In a multidrop system, use special character matching to determine if a device’s address
has been broadcast.
■
Once the address has been enabled in a multidrop system and a data stream is being
received, use special-character matching to detect the flag that signals the end of a data
packet.
13.5.9
Interface to General-Purpose DMA Channels
The general-purpose DMA channels can access either UART’s receivers and transmitters.
The receiver generates a DMA request when the Receive Data Ready (RDR) bit is set. The
transmitter generates a DMA request when the Transmit Holding register (THRE) bit is set.
This behavior is independent of the use of the High-Speed UART FIFOs and the FIFO
thresholds.
When a receive status condition that is configured to generate an interrupt request is
detected, DMA requests from the receiver are disabled. This leaves the data with the
interrupting condition in the (H)SPRXD register for easy examination by software in the
interrupt service routine. When the receive FIFO is enabled on the High-Speed UART, the
interrupt request is generated, and the DMA requests are suspended when the data reaches
the top of the FIFO. DMA requests are resumed when the interrupting condition is cleared
by software.
When extended reads are enabled, DMA requests from the receiver are not disabled when
an interrupting status condition is detected. In this situation, the status is maintained with
Содержание Am186 CC
Страница 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Страница 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Страница 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Страница 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Страница 39: ...Architectural Overview Am186 CC CH CU Microcontrollers User s Manual 1 15 Figure 1 6 32 Channel Linecard CH CC...
Страница 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Страница 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Страница 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Страница 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Страница 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...