diff --git a/lib/uart.c b/lib/uart.c index 18c58c0..0293a98 100644 --- a/lib/uart.c +++ b/lib/uart.c @@ -40,7 +40,7 @@ #define UART_ID 1 /**< USART peripheral */ /** @} */ -#define UART_BAUDRATE 921600 /**< serial baud rate, in bits per second (with 8N1 8 bits, no parity bit, 1 stop bit settings) */ +#define UART_BAUDRATE 115200 /**< serial baud rate, in bits per second (with 8N1 8 bits, no parity bit, 1 stop bit settings) */ /* output ring buffer, indexes, and available memory */ static volatile uint8_t tx_buffer[64] = {0}; /**< ring buffer for data to transmit */ @@ -62,7 +62,7 @@ void uart_setup(void) usart_set_databits(USART(UART_ID), 8); usart_set_stopbits(USART(UART_ID), USART_STOPBITS_1); usart_set_mode(USART(UART_ID), USART_MODE_TX_RX); - usart_set_parity(USART(UART_ID), USART_PARITY_NONE); + usart_set_parity(USART(UART_ID), USART_PARITY_EVEN); usart_set_flow_control(USART(UART_ID), USART_FLOWCONTROL_NONE); nvic_enable_irq(USART_IRQ(UART_ID)); // enable the UART interrupt