Asynchronous Serial Ports (UARTs)
13-10
Am186™CC/CH/CU Microcontrollers User’s Manual
13.5.2.2.2
Receiving with Address Bit Set
In a receive, when ABEN is set in the HSPCON0 register, the most significant bit of received
data can be read in the AB bit in the (H)SPSTAT register. The received AB bit can optionally
generate an interrupt (if the AB bit is set in the HSPIMSK register and the RSIE bit is set
in the HSPCON0 register). The received AB field must be cleared by software after reception
of a frame for which the address bit was set.
When using extended reads (the EXDRD bit is set in the (H)SPCON1 register), the AB bit
in the (H)SPRXD register is used instead. This allows reads from a single register, rather
than requiring an additional read of the (H)SPSTAT register. In addition, the AB bit in the
(H)SPRXD register is updated automatically; however, software must clear the AB bit in
the (H)SPSTAT register.
13.5.2.3
Receive Status and Data
The EXDWR and EXDRD bits in the (H)SPCON1 register enable the programmer to use
the upper bytes of the Transmit Data ((H)SPTXD) and Receive Data ((H)SPRXD) registers
for transmitted data (the transmit and receive address bits and receive data status).
Receive status bits are set in the High-Speed Serial Port Status (HSPSTAT) register when
the associated data byte is available to be read from the receive data register. When FIFOs
are enabled, this occurs when the byte reaches the top of the FIFO. The read-only Receive
Data Ready (RDR) bit in the (High-Speed) Serial Port Status (H)SPSTAT register reports
when received data is available. This bit is cleared by hardware when there is no valid data
waiting to be read from the (H)SPRXD register. If FIFOs are enabled, the FIFO is advanced
and the next byte reaches the top of the FIFO when the previous data is read.
Under some conditions, such as when the DMA interface is being used, it may be useful
for software to be able to examine the received character without affecting the status register
or removing the data from the FIFO. The UARTs support this through the use of an alternate
address for the receive data register (in the (H)SPRXDP register). This address allows
software to peek at the value of the receive data register.
13.5.2.4
Extended Reads and Writes
Both serial ports on the microcontroller support extended reads of the receive data register
and extended writes of the transmit data register.
When extended reads are enabled, by setting the EXDRD bit in the (H)SPCON1 register
to 1, the serial port receive register supports 16-bit reads. The low byte of the register
contains the normal receive data while the high byte contains status associated with the
current frame, including the value of the address bit. See the
Am186™CC/CH/CU
Microcontrollers Register Set Manual, order #21916, for a full description. Unlike the serial
port status register, the high byte of the receive data register in extended reads reflects
only the current frame. The accumulated status can be read from the status register normally
and bits set in the status register must be cleared by software.
When extended writes are enabled, by setting the EXDWR bit in the (H)SPCON1 register
to 1, the serial port transmit register supports 16-bit writes. Unlike extended reads which
have a broad application, extended writes are useful only for applications that are using the
address bit. When extended writes are enabled, the value of the address bit is written
directly to the transmit register. This eliminates the need to write the address bit value to
the (H)SPCON0 register.
Both extended reads and extended writes support word-wide DMA transfers. This allows
full automation of the transmission of data streams containing address bits. If DMA is
enabled with extended reads, status for each frame is stored along with the data for that
Содержание 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...