cancel
Showing results for 
Search instead for 
Did you mean: 

Wordlength setting when using Modbus RTU as UART

dkim.3
Associate II

Hello, Now I'm using Modbus RTU and UART. Modbus RTU communication is being performed through UART. Modbus RTU setting is data 8 bytes, but communication is possible only when uart wordlength is set to 9 in STMcubeIDE. Why is wordlength 9 when data is 8?

2 REPLIES 2
Pavel A.
Evangelist III

Parity bit.

According to the Modbus RTU spec, 2.5.1, support for even parity is required. Other modes (no parity, odd parity) are optional.

... and in the STM32 UART, confusingly different from other manufacturers' UARTS, the parity bit is counted up to the total word length.

JW