9-bit UART data not as expected
Hi
We are using the STM32L4S7AI. We have USART2 configured as 9-bit data.
We are using the HAL and have been using 8-bit HAL on many STM32 for a while... this is our first 9-bit data use.
We set UART_InitTypeDef.WordLength to UART_WORDLENGTH_9B.
On the wire, we have this message:
We have our UART configured as 19200, 9bit, 2 STOP, no parity.
So... for the first byte, given the image in the STM MCU guide:
I'd expect this to be LSB to MSB and have a value of 2 when read.
We are reading RDR under interrupt. It is a 16bit register:
uint16_t data = READ_REG( port->hwport->Instance->RDR );
data is assigned to 1.
The values on the wire above read as 001 0FE 0F7 0D7 1BE
Why is the STM32 treating the first bit on the wire as the 9th bit?
Thanks
