I am writing a UART communication protocol using an STM32F429-ZI Nucleo Board. I connected my board to my computer using a USB and also hooked up a logic analyzer to check what data is being sent. Looking a the logic analyzer results, the parity bits for inputted characters are all 0 when set to check for odd parity and all 1 when set to check for even parity. What could be causing this?
This is my initialization code for the STM32 board.
UartHandle.Instance = USARTx;
UartHandle.Init.BaudRate = 9600;
UartHandle.Init.WordLength = UART_WORDLENGTH_8B;
UartHandle.Init.StopBits = UART_STOPBITS_1;
UartHandle.Init.Parity = UART_PARITY_ODD;
UartHandle.Init.HwFlowCtl = UART_HWCONTROL_NONE;
UartHandle.Init.Mode = UART_MODE_TX_RX;
UartHandle.Init.OverSampling = UART_OVERSAMPLING_16;