WIZnet Developer Forum

W7500 Stick parity


I am trying to use stick parity in uart communication.
In reference manual it is mentioned under description of UART0LCR_H register. With useing PEN, SPS and EPS bits we can send parity 1 or 0.
I tried it with following code,
tmpreg = UART0->LCR_H;
tmpreg |= UART_Parity_One;
UART0->LCR_H |= tmpreg;

#define UART_Parity_One ((uint16_t)(UART_LCR_H_PEN | UART_LCR_H_SPS))
#define UART_Parity_Zero ((uint16_t)(UART_LCR_H_PEN | UART_LCR_H_EPS | UART_LCR_H_SPS))

But it works only once. If I change parity from 0 to 1 then it wont works.
I am not getting what I am missing.
Also there is any sample example in library for reference.

How to do it?

Thanks and regards,

Hello everyone,

Any updates?

Thanks and regards,

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.