01.06.2014 Views

STM32W108C8

STM32W108C8

STM32W108C8

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Serial interfaces<br />

<strong>STM32W108C8</strong><br />

Figure 12.<br />

RTS/CTS flow control connections<br />

STM32W108<br />

Other Device<br />

RXD<br />

TXD<br />

UART Receiver<br />

nRTS<br />

nCTS<br />

UART Transmitter<br />

TXD<br />

RXD<br />

UART Transmitter<br />

nCTS<br />

nRTS<br />

UART Receiver<br />

Table 50.<br />

The UART RTS/CTS flow control options are selected by the SC1_UARTFLOW and<br />

SC1_UARTAUTO bits in the SC1_UARTCFG register (see Table 50). Whenever the<br />

SC1_UARTFLOW bit is set, the UART will not start transmitting a character unless nCTS is<br />

low (asserted). If nCTS transitions to the high state (deasserts) while a character is being<br />

transmitted, transmission of that character continues until it is complete.<br />

If the SC1_UARTAUTO bit is set, nRTS is controlled automatically by hardware: nRTS is put<br />

into the low state (asserted) when the receive FIFO has room for at least two characters,<br />

otherwise is it in the high state (unasserted). If SC1_UARTAUTO is clear, software controls<br />

the nRTS output by setting or clearing the SC1_UARTRTS bit int the SC1_UARTCFG<br />

register. Software control of nRTS is useful if the external serial device cannot stop<br />

transmitting characters promptly when nRTS is set to the high state (deasserted).<br />

SC1_UARTCFG<br />

UART RTS/CTS flow control configurations<br />

SC1_UARTxxx (1)<br />

FLOW AUTO RTS<br />

Pins used<br />

Operating mode<br />

0 - - TXD, RXD No RTS/CTS flow control<br />

1 0 0/1<br />

1 1 -<br />

TXD, RXD,<br />

nCTS, nRTS<br />

TXD, RXD,<br />

nCTS, nRTS<br />

Flow control using RTS/CTS with software control of nRTS:<br />

nRTS controlled by SC1_UARTRTS bit in SC1_UARTCFG register<br />

Flow control using RTS/CTS with hardware control of nRTS:<br />

nRTS is asserted if room for at least 2 characters in receive FIFO<br />

1. The notation xxx means that the corresponding column header below is inserted to form the field name.<br />

9.6.4 DMA<br />

The DMA Channels section describes how to configure and use the serial receive and<br />

transmit DMA channels.<br />

The receive DMA channel has special provisions to record UART receive errors. When the<br />

DMA channel transfers a character from the receive FIFO to a buffer in memory, it checks<br />

the stored parity and frame error status flags. When an error is flagged, the<br />

SC1_RXERRA/B register is updated, marking the offset to the first received character with a<br />

parity or frame error. Similarly if a receive overrun error occurs, the SC1_RXERRA/B<br />

registers mark the error offset. The receive FIFO hardware generates the INT_SCRXOVF<br />

interrupt and DMA status register indicates the error immediately, but in this case the error<br />

87/215 Doc ID 018587 Rev 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!