AnsweredAssumed Answered

UART frame error, STM32L476, HAL

Question asked by kledtke.steve.002 on Oct 29, 2015
Hello.

I have configured a UART using HAL. For most things, the same Setup that I've already had working when using blocking mode, using Transmit only.
But now I tried to use Receive also.
When the program starts to *transmit*, using the HAL function, i.e. Receive was *not* yet called, the HAL_UART_ErrorCallback is called, with ErrorCode equalling 4, i.e. HAL_UART_ERROR_FE, frame error.

When this happens, in the error handler, I clear the flag: __HAL_UART_CLEAR_FLAG( huart, UART_CLEAR_FEF );

But I keep getting the error.

As I understand, frame error is a reception error.
So why could I be getting it, as soon as I start transmission, not reception?
Btw., the RX pin of the uart is tied to VCC, so there can be no wrong Signal.
I previously configured the RX pin as regular GPIO and polled it, to see that it's the correct pin. Now the RX pin is configured as Input, and alternate is set to the GPIO_AF*_UART* of the uart used.

Regards

Outcomes