mirror of https://github.com/Desuuuu/klipper.git
atsam: Don't set unused bits in UART
The CHRL and NBSTOP bits are not present in the UART peripheral, only the USART. Signed-off-by: Alex Maclean <monkeh@monkeh.net>
This commit is contained in:
parent
326c12728c
commit
e2133a7301
|
@ -68,8 +68,7 @@ serial_init(void)
|
||||||
Port->UART_IDR = 0xFFFFFFFF;
|
Port->UART_IDR = 0xFFFFFFFF;
|
||||||
|
|
||||||
// Enable uart
|
// Enable uart
|
||||||
Port->UART_MR = (US_MR_CHRL_8_BIT | US_MR_NBSTOP_1_BIT | UART_MR_PAR_NO
|
Port->UART_MR = (UART_MR_PAR_NO | UART_MR_CHMODE_NORMAL);
|
||||||
| UART_MR_CHMODE_NORMAL);
|
|
||||||
Port->UART_BRGR = SystemCoreClock / (16 * CONFIG_SERIAL_BAUD);
|
Port->UART_BRGR = SystemCoreClock / (16 * CONFIG_SERIAL_BAUD);
|
||||||
Port->UART_IER = UART_IER_RXRDY;
|
Port->UART_IER = UART_IER_RXRDY;
|
||||||
armcm_enable_irq(UARTx_Handler, UARTx_IRQn, 0);
|
armcm_enable_irq(UARTx_Handler, UARTx_IRQn, 0);
|
||||||
|
|
Loading…
Reference in New Issue