AnsweredAssumed Answered

STM32CubeMX 4.14.0, USART AND UART

Question asked by sammalisto.pauli on Apr 3, 2016
Latest reply on Apr 4, 2016 by ForumSTM32.ForumSTM3

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

#define HAL_UART_MODULE_ENABLED

//#define 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

Outcomes