diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/malloc.c b/libraries/AP_HAL_ChibiOS/hwdef/common/malloc.c index ae692e41e5..51fe84e063 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/malloc.c +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/malloc.c @@ -30,7 +30,13 @@ #include #include +#if defined(STM32F7) && STM32_DMA_CACHE_HANDLING == TRUE +// to allow for dma management functions we need buffers to be +// aligned to the cache line size +#define MIN_ALIGNMENT 32 +#else #define MIN_ALIGNMENT 8 +#endif #if defined(CCM_RAM_SIZE) #ifndef CCM_BASE_ADDRESS