5.1.1.2.2. Functional Requirements
The system shall set the M and CLKEN bits in the USART_CR2 register to select the operating mode for the USART. |
The system shall allow the baud rate to be programmed using the USART_BRR register based on the system clock. |
The system shall enable or disable parity checking by setting the PCE (Parity Control Enable) and PS (Parity Selection) bits. |
The system shall allow selection of 8-bit or 9-bit word length and 1 or 2 stop bits by setting the M1, M0, and STOP bits. |
The system shall enable or disable data transmission by setting the TE bit. |
The system shall enable or disable data reception by setting the RE bit. |
The system shall enable the transmission complete interrupt by setting the TCIE bit. |
The system shall enable the reception complete interrupt by setting the RXNEIE bit. |
The system shall support DMA for data transmission when the DMAT bit in the USART_CR3 register is enabled. |
The system shall support DMA for data reception when the DMAR bit in the USART_CR3 register is enabled. |
The system shall enable RTS (Request to Send) and CTS (Clear to Send) hardware flow control by setting the RTSE and CTSE bits in the USART_CR3 register. |
The system shall enable LIN mode by setting the LINEN bit in the USART_CR2 register. |
The system shall configure the clock polarity and phase for synchronous communication using the CPOL and CPHA bits. |
The clock source must be enabled before enabling the USART module. |
Data must be received through the USART_RDR (Receive Data Register). |
Framing error detection must be used when validating the integrity of received data in asynchronous communication. |