lpc176x: Reset LPC_UART0->FDR when using serial
The popular "LPC17xx-DFU-Bootloader" alters the LPC_UART0->FDR register, so be sure to reset it back to its default when using serial in Klipper. Reported by @b-vs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
0343d0c73a
commit
b77375e955
|
@ -24,6 +24,7 @@ serial_init(void)
|
||||||
uint32_t div = pclk / (CONFIG_SERIAL_BAUD * 16);
|
uint32_t div = pclk / (CONFIG_SERIAL_BAUD * 16);
|
||||||
LPC_UART0->DLL = div & 0xff;
|
LPC_UART0->DLL = div & 0xff;
|
||||||
LPC_UART0->DLM = (div >> 8) & 0xff;
|
LPC_UART0->DLM = (div >> 8) & 0xff;
|
||||||
|
LPC_UART0->FDR = 0x10;
|
||||||
LPC_UART0->LCR = 3; // 8N1 ; clear DLAB bit
|
LPC_UART0->LCR = 3; // 8N1 ; clear DLAB bit
|
||||||
|
|
||||||
// Enable fifo
|
// Enable fifo
|
||||||
|
|
Loading…
Reference in New Issue