diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-07-10 20:00:58 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-07-10 20:00:58 -0400 |
commit | b77375e955e2278977c97fe2509c895d6dc75bd9 (patch) | |
tree | 2e89db77c88f3396df670a10e0371b406e788c5a /src/lpc176x/serial.c | |
parent | 0343d0c73aed236232592e9c46874de7ab761139 (diff) | |
download | kutter-b77375e955e2278977c97fe2509c895d6dc75bd9.tar.gz kutter-b77375e955e2278977c97fe2509c895d6dc75bd9.tar.xz kutter-b77375e955e2278977c97fe2509c895d6dc75bd9.zip |
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>
Diffstat (limited to 'src/lpc176x/serial.c')
-rw-r--r-- | src/lpc176x/serial.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lpc176x/serial.c b/src/lpc176x/serial.c index 0e0c6aaf..63755467 100644 --- a/src/lpc176x/serial.c +++ b/src/lpc176x/serial.c @@ -24,6 +24,7 @@ serial_init(void) uint32_t div = pclk / (CONFIG_SERIAL_BAUD * 16); LPC_UART0->DLL = div & 0xff; LPC_UART0->DLM = (div >> 8) & 0xff; + LPC_UART0->FDR = 0x10; LPC_UART0->LCR = 3; // 8N1 ; clear DLAB bit // Enable fifo |