I set up K40 UART3 for 9 data bit and 1 stop bit, parity enable and even parity transmission. However When I transmit modbus data with odd parity or no parity to the K40, it can still receive data perfectly.
the same goes to odd parity or no parity setting. And I verified that UART3_C1 register was showing the correct setting. is there something wrong with this K40 parity ?
Hi,
I checked K40 UART module validation code, which already test UART 9-bit data receive with parity enable. And there is no error reported.
During the UART module validation, it use two UART modules to do 9-bit data transmit and receive.
More detailed info, please check attached UART RX validation code (related validation code located at uart_9bit_rx_test() function).
Wish it helps.
best regards
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------