UART even parity received WRONG
hey there
I try to receive some characters using UART and here is the config
huart1.Instance = USART1;
huart1.Init.BaudRate = 4800;
huart1.Init.WordLength = UART_WORDLENGTH_8B;
huart1.Init.StopBits = UART_STOPBITS_1;
huart1.Init.Parity = UART_PARITY_EVEN;
huart1.Init.Mode = UART_MODE_TX_RX;
huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart1.Init.OverSampling = UART_OVERSAMPLING_16;
I use HTerm as a serial terminal to send data to it. I set the Baud rate to 4800, Data length to 7bits(I used CubeMX config, there it indicates the word length is parity included, so 8bits means 7bits+1parity I guess), and 1 stop bit and parity as EVEN.
things go wrong for some characters: for example 0xAF and 0xC5 are received as 0x2F and 0x45 respectively. some other characters are received OK such as: 0x41 or 0x00..
why is that? I noticed that the error is happening in the last bit of the faulty bytes, why is that?
