-
Notifications
You must be signed in to change notification settings - Fork 1k
SERIAL_8E1: wrong data #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Right, Table 1. UART frame format.
In HardwareSerial.cpp:
if parity is set odd or even, need to set : and it is ok.
|
I changed to:
and it works (also with my HW that requires 19200 8E1). |
Fix stm32duino#50 Arduino defined several configs (data, parity and stop bits) values for Serial.begin(speed, config) See: https://www.arduino.cc/en/Serial/Begin Below configs could not be supported by STM32 as minimum wordlength (data + parity) is UART_WORDLENGTH_7B (7 bits). SERIAL_5N1 SERIAL_5N2 SERIAL_5E1 SERIAL_5E2 SERIAL_5O1 SERIAL_5O2 SERIAL_6N1 SERIAL_6N2 Signed-off-by: Frederic Pillon <[email protected]>
Tested with:
|
i tested this code on Arduino Zero and L476 and with a loop connection (RX shorted to TX)
Zero write 0xFF and read 0xFF
L476 write 0xFF and read 0x7F
The text was updated successfully, but these errors were encountered: