Hi @Patrik78 ,
Expert feedback:
Example flow for data transmitted (assuming stick parity not enabled):
|
Data
|
Even Parity (Tx)
|
Even Parity (Rx)
|
|
0x55
|
0101 0101 + 0 (check bit ‘0;’ because even par)
|
0101 0101 + 0 (checked bit ‘0’)
|
|
0x57
|
01010111 + 1 (check bit ‘1;’ because even par)
|
01010111 + 1 (checked bit ‘1’)
|
|
Data
|
Odd Parity (Tx)
|
Odd Parity (Rx)
|
|
0x55
|
01010101 + 1 (plus bit ‘1;’ because odd par)
|
01010101 + 1 (checked bit ‘1’)
|
|
0x57
|
01010111 + 0 (plus bit ‘0;’ because odd par)
|
01010111 + 0 (checked bit ‘0’)
|
(Since Stick parity is enable, parity does not depend on data):
|
Data
|
Even Parity (Tx) (SP=1, EPS=1, PEN=1)
|
Odd Parity (Rx) (SP=1, EPS=0, PEN=1)
|
Error
|
|
0x55
|
01010101 + 0 (plus bit ‘0;’ because even par)
|
01010101 + 0 (checked bit ‘0’)
|
Should get an error because Rx data is even parity
|
|
0x57
|
01010111 + 0 (plus bit ‘0;’ because even par with stick par)
|
01010111 + 0 (check bit ‘1;’ because even par)
|
Should not get an error because Rx data is odd parity
|
***The receiver side it will only check, the parity bit addition will be at the transmitter side only.
Both transmitting and receiving UARTs recommended to be configured same parity, either even or odd.
Recommended not to use the Stick Parity to 1, since the parity bits will be set, it will not be dependent on the data transmitted.
Thanks,
Best regards,
Sheng
p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.