EasyManua.ls Logo

ST STM32F31xx

ST STM32F31xx
584 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
UM1581
Universal synchronous asynchronous receiver
transmitter (USART)
DocID023800 Rev 1
535/584
Specifies wether the hardware flow control mode is enabled or disabled. This
parameter can be a value of USART_Hardware_Flow_Control
23.1.3 USART_ClockInitTypeDef
USART_ClockInitTypeDef is defined in the stm32f30x_usart.h
Data Fields
uint32_t USART_Clock
uint32_t USART_CPOL
uint32_t USART_CPHA
uint32_t USART_LastBit
Field Documentation
uint32_t USART_ClockInitTypeDef::USART_Clock
Specifies whether the USART clock is enabled or disabled. This parameter can
be a value of USART_Clock
uint32_t USART_ClockInitTypeDef::USART_CPOL
Specifies the steady state of the serial clock. This parameter can be a value of
USART_Clock_Polarity
uint32_t USART_ClockInitTypeDef::USART_CPHA
Specifies the clock transition on which the bit capture is made. This parameter
can be a value of USART_Clock_Phase
uint32_t USART_ClockInitTypeDef::USART_LastBit
Specifies whether the clock pulse corresponding to the last transmitted data bit
(MSB) has to be output on the SCLK pin in synchronous mode. This parameter
can be a value of USART_Last_Bit
23.2 USART Firmware driver API description
The following section lists the various functions of the USART library.
23.2.1 How to use this driver
1. Enable peripheral clock using
RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE) function for
USART1 or using RCC_APB1PeriphClockCmd(RCC_APB1Periph_USARTx,
ENABLE) function for USART2, USART3, UART4 and UART5.
2. According to the USART mode, enable the GPIO clocks using
RCC_AHBPeriphClockCmd() function. (The I/O can be TX, RX, CTS, or and SCLK).
3. Peripheral's alternate function:
Connect the pin to the desired peripherals' Alternate Function (AF) using
GPIO_PinAFConfig() function.

Table of Contents

Related product manuals