From 925ce44a6c870710070d30ff4d1e962b9ea361a3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 17 Jan 2020 15:58:30 +1100 Subject: [PATCH] HAL_ChibiOS: use 4k bouncebuffer for sdcard match AP_Logger IO size --- libraries/AP_HAL_ChibiOS/sdcard.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/sdcard.cpp b/libraries/AP_HAL_ChibiOS/sdcard.cpp index 9906dec0a5..7fbd64a292 100644 --- a/libraries/AP_HAL_ChibiOS/sdcard.cpp +++ b/libraries/AP_HAL_ChibiOS/sdcard.cpp @@ -56,7 +56,9 @@ bool sdcard_init() #if HAL_USE_SDC if (SDCD1.bouncebuffer == nullptr) { - bouncebuffer_init(&SDCD1.bouncebuffer, 512, true); + // allocate 4k bouncebuffer for microSD to match size in + // AP_Logger + bouncebuffer_init(&SDCD1.bouncebuffer, 4096, true); } if (sdcard_running) {