2020-09-17 09:13 AM
Hi,
I'm using STM8S for UART half duplex communication (single wire). I'm using the standard library to set the UART up in 9600 baud rate, 8 data bit, even parity and 1 stop bit. I recieve data using interrupts. On the third byte, I get a parity error. If I do not use parity check, everything works correctly. But when I enable parity, the third byte gives a parity error.
Attached is an image of the data I'm receiving (0x93 0x93 0x01 0xB1 .....). Any one has an idea why this may happen?
2020-09-17 09:24 AM
ST counts the parity bit as a data bit, for 8E1 you'd need to configure the UART in 9-bit mode.
2020-09-18 02:08 AM
That solved my issue. Thanks!!!