7 Replies Latest reply on Jun 8, 2017 2:36 AM by JoMe_264151

    UART detecting a mark/space parity bit

              I'm trying to detect a UART data that uses a mark/space as parity bit, I tried the following code but it doesn't seem to work for me. temp = UART_GetChar() if(temp != 0) { If(UART_ReadRxStatus() & UART_RX_STS_MARKSPS) { while(USB_CDCIsReady() == 0); USB_PutChar('M') } else { while(USB_CDCIsReady() == 0); USB_PutChar('S') } } The usb always returns an S regardless of the parity bit and the data that is being received. The data is being received correctly though I just can't detect whether the parity bit is high or low.