Set DShot DMA buffer attribute to FAST_RAM_ZERO_INIT

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.
This commit is contained in:
jflyper 2019-07-26 17:31:10 +09:00
parent 7a84a5cf73
commit 79b11b9c61
1 changed files with 3 additions and 1 deletions

View File

@ -59,8 +59,10 @@ motorDevice_t *dshotPwmDevInit(const struct motorDevConfig_s *motorConfig, uint1
#define PROSHOT_TELEMETRY_INPUT_LEN 8 #define PROSHOT_TELEMETRY_INPUT_LEN 8
// For H7, DMA buffer is placed in a dedicated segment for coherency management // 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 #define DSHOT_DMA_BUFFER_ATTRIBUTE DMA_RAM
#elif defined(STM32F7)
#define DSHOT_DMA_BUFFER_ATTRIBUTE FAST_RAM_ZERO_INIT
#else #else
#define DSHOT_DMA_BUFFER_ATTRIBUTE // None #define DSHOT_DMA_BUFFER_ATTRIBUTE // None
#endif #endif