From 79b11b9c6114162bf025755eb8b51b317f9f7907 Mon Sep 17 00:00:00 2001 From: jflyper Date: Fri, 26 Jul 2019 17:31:10 +0900 Subject: [PATCH] Set DShot DMA buffer attribute to FAST_RAM_ZERO_INIT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The buffer was originally a part of motorDmaOutput_s structure which resided in the FAST_RAM_ZERO_INIT(DTCM RAM). The buffer was separated as a part of the motor refactor #8534, and wasn’t properly attributed. In the future, DMA buffer coherence will be maintained by MPU and the DShot buffer will be moved there to save the scarce DTCM resource. --- src/main/drivers/dshot_dpwm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/drivers/dshot_dpwm.h b/src/main/drivers/dshot_dpwm.h index 16cd1ffae0..6cfc9af711 100644 --- a/src/main/drivers/dshot_dpwm.h +++ b/src/main/drivers/dshot_dpwm.h @@ -59,8 +59,10 @@ motorDevice_t *dshotPwmDevInit(const struct motorDevConfig_s *motorConfig, uint1 #define PROSHOT_TELEMETRY_INPUT_LEN 8 // For H7, DMA buffer is placed in a dedicated segment for coherency management -#ifdef STM32H7 +#if defined(STM32H7) #define DSHOT_DMA_BUFFER_ATTRIBUTE DMA_RAM +#elif defined(STM32F7) +#define DSHOT_DMA_BUFFER_ATTRIBUTE FAST_RAM_ZERO_INIT #else #define DSHOT_DMA_BUFFER_ATTRIBUTE // None #endif