STM8 UART2, Adding a parity bit to UART packet
I am attempting to configure the UART2 peripheral of the STM8S105C4 MCU with an even parity control using this development environment: ST Visual Develop, ST Visual Programmer, STM8 Cosmic compiler, Library: STM8 Standard Peripheral Library (SPL).
Problem: No parity bit generated, as shown by the Logic8 logic analyzer. See the below screenshot: the parity bit is configured but is missing in the signal.
Question: why is the Parity Control not working? The following SPL function UART_Config() should configure one even parity bit per byte.
Thank you!

static void UART_Config(void)
{
/* UART2 configured as follow:
- BaudRate = 38400
- Word Length = 8 Bits
- Two Stop Bit
- One parity bit (even)
- Receive and transmit enabled
*/
UART2_DeInit();
UART2_Init((uint32_t) 38400, UART2_WORDLENGTH_8D,
UART2_STOPBITS_2, UART2_PARITY_EVEN,
UART2_SYNCMODE_CLOCK_DISABLE, UART2_MODE_TXRX_ENABLE);
/* UART2: Disable the Receive interrupt: */
/* RXNE - Received data ready to be read */
/* OR - Overrun error detected */
UART2_ITConfig(UART2_IT_RXNE_OR, DISABLE);
/* UART2: Disable the Transmit interrupt: */
/* TXE - Transmit buffer not empty, still transmitting */
UART2_ITConfig(UART2_IT_TXE, DISABLE);
/* Enable general interrupts */
enableInterrupts();
/* Enable UART Half Duplex Mode (NOT AVAILABLE FOR UART2) */
//UART2_HalfDuplexCmd(ENABLE);
/* Enable UART2 communication */
UART2_Cmd(ENABLE);
}
