cancel
Showing results for 
Search instead for 
Did you mean: 

UART/USART bug in STM32CubeMX V4.3 with STM32Cube V1.0

Osto
Senior
Posted on July 31, 2014 at 21:04

Hi,

There is a bug in STMCube when using UART/USART. When I config STM32F407VG and config UART4 and USART2 with MDK, then only stm32fxx_hal_uart is included. The stm32fxx_hal_uSart is not included and so is the config not useable. I have to add the stm32fxx_hal_usart.c manually to be able to use its functions.

See attached file which produces only UART file and not USART files.
2 REPLIES 2
stm32cube-t
Senior III
Posted on September 10, 2014 at 15:27

Hello,

In the HAL drivers named stm32f4xx_hal_usart.c and stm32f4xx_hal_uart.c,  USART and UART refer to the peripheral modes, respectively synchronous and asynchronous, and not to actual peripheral names.

So, when you are configuration the USART peripheral to be in asynchronous mode, you will be using the stm32f4xx_hal_uart.c library.

 

Another example, you may configure the USART peripheral in IrDA mode, you will find in the generated project the corresponding stm32f4xx_hal_irda.c driver.

Best Regards

Andrew Neil
Evangelist III
Posted on September 10, 2014 at 16:32

''USART and UART refer to the peripheral modes, respectively synchronous and asynchronous''

So shouldn't they be ''USRT'' and ''UART'', then?!