How to enable USART driver in CubeMX?
The code generated by the STM32CubeMX is using the UART rather than the USART.
How do we generate the code using the USART driver lib via the CubeMX?
The code generated by the STM32CubeMX is using the UART rather than the USART.
How do we generate the code using the USART driver lib via the CubeMX?
Hi @Community member
USART1, USART2, ... and/or UART4 or UART5, ... are instances of peripherals, able to achieve UART/USART communications.
Usually, USARTx instances are able to handle :
- UART comms : Asynchronous communication, no CLK signal
- USART comms : Synchronous, based on a CLK signal
while UARTy instances only handle :
- UART comms : Asynchronous communication, no CLK signal
So depending on what type of communication you want to handle, you need to select the appropriate type in CubeMx configuration :
"Asynchronous" => Use of HAL UART API, UART comm type
"Synchronous" => Use of HAL USART API, USART comm type
Hope this answers your question
Regards
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.