13.11 SCI Port Interrupts
The SCI receiver and transmitter can be interrupt controlled. The SCICTL2 register has one flag bit (TXRDY)
that indicates active interrupt conditions, and the SCIRXST register has two interrupt flag bits (RXRDY and
BRKDT), plus the RX ERROR interrupt flag that is a logical-OR of the FE, OE, BRKDT, and PE conditions. The
transmitter and receiver have separate interrupt-enable bits. When not enabled, the interrupts are not asserted;
however, the condition flags remain active, reflecting transmission and receipt status.
The SCI has independent peripheral interrupt vectors for the receiver and transmitter. Peripheral interrupt
requests can be either high priority or low priority. This is indicated by the priority bits that are output from the
peripheral to the PIE controller. When both RX and TX interrupt requests are made at the same priority level, the
receiver always has higher priority than the transmitter, reducing the possibility of receiver overrun.
The operation of peripheral interrupts is described in the Peripheral Interrupts section of the
System Control and
Interrupts
chapter.
• If the RX/BK INT ENA bit (SCICTL2, bit 1) is set, the receiver peripheral interrupt request is asserted when
one of the following events occurs:
– The SCI receives a complete frame and transfers the data in the RXSHF register to the SCIRXBUF
register. This action sets the RXRDY flag (SCIRXST, bit 6) and initiates an interrupt.
– A break detect condition occurs (the SCIRXD is low for 9.625 bit periods following a missing stop bit). This
action sets the BRKDT flag bit (SCIRXST, bit 5) and initiates an interrupt.
• If the TX INT ENA bit (SCICTL2.0) is set, the transmitter peripheral interrupt request is asserted whenever
the data in the SCITXBUF register is transferred to the TXSHF register, indicating that the CPU can write to
SCITXBUF; this action sets the TXRDY flag bit (SCICTL2, bit 7) and initiates an interrupt.
Note
Interrupt generation due to the RXRDY and BRKDT bits is controlled by the RX/BK INT ENA bit
(SCICTL2, bit 1). Interrupt generation due to the RX ERROR bit is controlled by the RX ERR INT ENA
bit (SCICTL1, bit 6).
13.12 SCI Baud Rate Calculations
The internally generated serial clock is determined by the low-speed peripheral clock LSPCLK) and the baud-
select registers. The SCI uses the 16-bit value of the baud-select registers to select one of the 64K different
serial clock rates possible for a given LSPCLK.
See the bit descriptions in the baud-select registers, for the formula to use when calculating the SCI
asynchronous baud.
shows the baud-select values for common SCI bit rates. LSPCLK/16 is the
maximum baud rate. For example, if LSPCLK is 100 MHz, then the maximum baud rate is 6.25 Mbps.
Table 13-3. Asynchronous Baud Register Values for Common SCI Bit Rates
Ideal Baud
LSPCLK Clock Frequency, 100 MHz
BRR
Actual Baud
% Error
2400
5207 (1457h)
2400
0
4800
2603 (A2Bh)
4800
0
9600
1301 (515h)
9601
0.01
19200
650 (28Ah)
19201
0.01
38400
324 (144h)
38462
0.16
Serial Communications Interface (SCI)
810
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......