2016-04-03 04:45 AM
I generated code with CubeMX 4.14.0 for STM32F4 USART1. What I got is mainly for UART.
In stm32f4xx_hal_conf.h, UART module is included, not USART
&sharpdefine HAL_UART_MODULE_ENABLED
//&sharpdefine HAL_USART_MODULE_ENABLED
In stm32f4xx_hal_uart.h, there is HwFlowCtl, although UART has no flow control. This has been taken care of in the code:
/* Check the parameters */
if(huart->Init.HwFlowCtl != UART_HWCONTROL_NONE)
{
/* The hardware flow control is available only for USART1, USART2, USART3 and USART6 */
assert_param(IS_UART_HWFLOW_INSTANCE(huart->Instance));
assert_param(IS_UART_HARDWARE_FLOW_CONTROL(huart->Init.HwFlowCtl));
}
Flow control belongs to USARTs, but that is missing in USART_InitTypeDef.
Have I misunderstood something or are there still that kind of bugs in version 4.14.0
#stm32cubemx2016-04-04 10:05 AM
Hello,
This is not a bug, but it's related to selected mode:- If selected synchronous mode; USART is enabled.- If asynchronous mode, UART is enabled.-ForumSTM32-