UART odd and even parity #272
Replies: 2 comments
-
I am updating this post as after more investigation the following details are all correct, however the underlying PIGPIO Library does not support the required parity. For the parity options to function it would require PIGPIO updates and pi4j -v2 updates to use that functionality. serOpen This function opens a serial device at a specified baud rate and with specified flags. The device name must start with /dev/tty or /dev/serial. No flags are currently defined. This parameter should be set to zero. If you are using pin 8 and 10, GPIO14 and GPIO15 read on. The BCM2711 device has six UARTs. One mini UART (UART1) and five PL011 UARTs (UART0, UART2, UART3, UART4 &UART5). Those pins are the mini-com uart-- Does not have the parity you wanted. You need to use one of the ALT uarts PL011 If you are already using an ALT uart let me know and I will investigate more https://datasheets.raspberrypi.com/bcm2711/bcm2711-peripherals.pdf |
Beta Was this translation helpful? Give feedback.
-
See above comment for full details. At present time you would be required to write the code to 'bit bang' GPIO pins yourself to achieve this parity. |
Beta Was this translation helpful? Give feedback.
-
The Raspberry Pi 4 board with the Raspberry Pi OS and Java 17 is connected via UART to the computer (macOS). Communication parameters are 9600, 8 data bits, 1 stop bit. On Raspberry and macOS, minicom is running and communication works in both dir for no parity and for even and odd parity. In the second step, a program written on the Raspberry was launched:
for no parity it works, i.e. macOS receives characters correctly "at\r". On the other hand, for even and odd parities, the '\r' character (0x0D) is changed to 0x0C or 0xC3 but "at" is sent correctly.
Beta Was this translation helpful? Give feedback.
All reactions