From f753669a58a025556c469bf78596ea302729892e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Feb 2019 18:43:23 +1100 Subject: [PATCH] HAL_ChibiOS: improved check for DTCM ram --- libraries/AP_HAL_ChibiOS/hwdef/common/bouncebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/bouncebuffer.c b/libraries/AP_HAL_ChibiOS/hwdef/common/bouncebuffer.c index 0624afb38d..9b5204a549 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/bouncebuffer.c +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/bouncebuffer.c @@ -24,7 +24,7 @@ #if defined(STM32H7) // always use a bouncebuffer on H7, to ensure alignment and padding #define IS_DMA_SAFE(addr) false -#elif DTCM_RAM_SIZE_KB > 0 +#elif defined(DTCM_RAM_SIZE_KB) // on F7 and H7 we check we are in the DTCM region, and 16 bit aligned #define IS_DMA_SAFE(addr) ((((uint32_t)(addr)) & ((0xFFFFFFFF & ~(DTCM_RAM_SIZE_KB*1024U-1)) | 1U)) == 0x20000000) #else