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.
H7
General CubeMX Settings
| No. | Name | Path | Setting | Setting Description | Screenshot |
|---|---|---|---|---|---|
| 1 | Mode | Pinout & Configuration > Connectivity > USART* > Mode | Asynchronous | Selecting asynchronous mode | ![]() |
| 2 | Clock Source | Clock Configuration > Peripheral Clocks > USART* Clock Mux | User preference dependent | Selecting the clock source for the interface | ![]() |
| 3 | Data Direction | Pinout & Configuration > Connectivity > USART* > Parameter Settings > Advanced Parameters > Data Direction | Receive and Transmit | Setting data direction | ![]() |
| 4 | Global Interrupt | Pinout & Configuration > Connectivity > USART* > NVIC Settings > Global Interrupt | Enabled | Enabling global interrupts for the interface | ![]() |
| 5 | Add DMA | Pinout & Configuration > Connectivity > USART* > DMA Settings > Add | Add | Adding DMA support | ![]() |
| 6 | DMA Request | Pinout & Configuration > Connectivity > USART* > DMA Settings > DMA Request > Select | USART*_RX | Selecting the DMA request for reception | ![]() |
| 7 | DMA Mode | Pinout & Configuration > Connectivity > USART* > DMA Settings > Mode | Normal | Setting the DMA operation mode to normal | ![]() |
| 8 | Memory | Pinout & Configuration > Connectivity > USART* > DMA Settings > Memory | Enabled | Enabling DMA memory increment support | ![]() |
| 9 | Data Width | Pinout & Configuration > Connectivity > USART* > DMA Settings > Data Width | Byte | Setting the data width to byte | ![]() |
| 10 | Maximal output speed | Pinout & Configuration > System Core > GPIO > USART* > click on the pin and open configuration window > Maximum output speed | Very High | Setting the pin operating speed. Apply to both pins handling TX and RX lines | ![]() |
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









