From 2e15285c519bf070b9c782f68717310cfae4ee67 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 22 Jan 2018 07:40:55 +1100 Subject: [PATCH] HAL_ChibiOS: refuse unbuffered writes without DMA we would need much more complex code to handle this --- libraries/AP_HAL_ChibiOS/UARTDriver.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/UARTDriver.cpp b/libraries/AP_HAL_ChibiOS/UARTDriver.cpp index bf6c8c48ff..a906709d4b 100644 --- a/libraries/AP_HAL_ChibiOS/UARTDriver.cpp +++ b/libraries/AP_HAL_ChibiOS/UARTDriver.cpp @@ -686,6 +686,10 @@ void UARTDriver::update_rts_line(void) */ bool UARTDriver::set_unbuffered_writes(bool on) { + if (on && !sdef.dma_tx) { + // we can't implement low latemcy writes safely without TX DMA + return false; + } unbuffered_writes = on; return true; }