AnsweredAssumed Answered

STM32CubeMX bug in uart dma

Question asked by thomas.paul.002 on Sep 13, 2016
Latest reply on Sep 13, 2016 by cnoviello

I think there might be a bug in the STM32CubeMX generated code. I'm using the NUCLEO-F302R8 USART2 (PA2, PA3) with DMA for the tx. The first HAL_UART_Transmit_DMA() is always OK, but subsequent calls were failing because of the check on huart->gState at the start of HAL_UART_Transmit_DMA(), so I added a
 huart->gState = HAL_UART_STATE_READY;
Line just after __HAL_UART_ENABLE_IT() in UART_DMATransmitCplt() and this seemed to do the trick. I've attached the STM32CubeMX file (Version 4.16.1 and STM32F3 firmware package 1.6.1.