Skip to Content
Block descriptionsUSARTCubeMX Configuration for Given MCU Model

CubeMX Configuration for a Given MCU Model

The following section describes the CubeMX configuration for UART, USART, or LPUART interfaces in STM microcontrollers. Please note that these parameters serve as a configuration example and should be adjusted to meet the requirements of your specific application.

General CubeMX Settings

No.NamePathSettingSetting DescriptionScreenshot
1ModePinout & Configuration > Connectivity > USART* > ModeAsynchronousSelecting asynchronous modeUSART Mode setting
2Clock SourceClock Configuration > Peripheral Clocks > USART* Clock MuxUser preference dependentSelecting the clock source for the interfaceUSART Clock Source setting
3Data DirectionPinout & Configuration > Connectivity > USART* > Parameter Settings > Advanced Parameters > Data DirectionReceive and TransmitSetting data directionUSART Data Direction setting
4Global InterruptPinout & Configuration > Connectivity > USART* > NVIC Settings > Global InterruptEnabledEnabling global interrupts for the interfaceUSART Global Interrupt setting
5Add DMAPinout & Configuration > Connectivity > USART* > DMA Settings > AddAddAdding DMA supportUSART DMA setting
6DMA RequestPinout & Configuration > Connectivity > USART* > DMA Settings > DMA Request > SelectUSART*_RXSelecting the DMA request for receptionUSART DMA Request setting
7DMA ModePinout & Configuration > Connectivity > USART* > DMA Settings > ModeNormalSetting the DMA operation mode to normalUSART DMA Mode setting
8MemoryPinout & Configuration > Connectivity > USART* > DMA Settings > MemoryEnabledEnabling DMA memory increment supportUSART DMA Details setting
9Data WidthPinout & Configuration > Connectivity > USART* > DMA Settings > Data WidthByteSetting the data width to byteUSART DMA Data Width setting
10Maximal output speedPinout & Configuration > System Core > GPIO > USART* > click on the pin and open configuration window > Maximum output speedVery HighSetting the pin operating speed. Apply to both pins handling TX and RX linesUSART pin setting

USART* - the asterisk symbol (*) denotes the number of the USART module used in the model, e.g., USART1, USART2, etc. Depending on the chosen interface type, this can also be UART* or LPUART*.

Last updated on