STM32Cube  Version 2.0
Create Projects for STM32F0 Series with STM32Cube HAL and STM32CubeMX
 All Files Pages
CMSIS-Driver USART Setup in Synchronous mode

The CMSIS-Driver USART requires:

  • Setup of USART/UART mode (Asynchronous, Synchronous, Single wire, IrDA or SmartCard)
  • Optional configuration of Hardware Flow Control (only in Asynchronous mode)

Valid settings for various evaluation boards are listed in the table below:

Peripheral Resource STM32091C-EVAL
USART Peripheral USART1
USART Mode Synchronous
TX Pin PA9
RX Pin PA10
CK Pin PA8

For different boards, refer to the hardware schematics to reflect correct setup values.

The STM32CubeMX configuration for STMicroelectronics STM32091C-EVAL Board with steps for Pinout, Clock, and System Configuration are listed below. Enter the values that are marked bold.

Pinout tab

  1. Configure peripheral
    • Peripherals USART1: Mode=Synchronous
  2. Configure pins PA8 .. PA10 as USART1 peripheral alternative pins
    • Click in chip diagram on pin PA8 and select USART1_CK
    • Click in chip diagram on pin PA9 and select USART1_TX
    • Click in chip diagram on pin PA10 and select USART1_RX

Clock Configuration tab

  1. Configure USART1 Clock

Configuration tab

  1. Under Connectivity open USART1 Configuration:
    • Parameter Settings: not used
    • User Constants: not used
    • NVIC Settings: enable interrupts
      Interrupt Table Enabled Preemption Priority
      DMA1 channel 4 to 7 and DMA2 channel 3 .. ON 0
      USART1 global interrupt / USART1 wake-up..ON 0
    • optional DMA Settings: setup DMA transfers for Rx and Tx (DMA is optional)
      Add - Select USART1_RX: Stream=DMA1 Channel 5, DMA Request Settings: not used, Priority=Low
      Add - Select USART1_TX: Stream=DMA1 Channel 4, DMA Request Settings: not used, Priority=Low
    • GPIO Settings: review settings
      Pin Name Signal on Pin GPIO output..GPIO mode GPIO Pull-up/Pull..Maximum out Fast Mode User Label
      PA8 USART1_CK n/a Alternate ..No pull-up and no..High n/a .
      PA9 USART1_TX n/a Alternate ..Pull-up High Disable .
      PA10 USART1_RX n/a Alternate ..Pull-up High Disable .
      Click OK to close the USART1 Configuration dialog