1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 01:05:21 +03:00

Merge pull request #7119 from iNavFlight/dzikuvx-fix-h7-dshot-dma

Fix DSHOT on H7 by moving to DMA_RAM
This commit is contained in:
Paweł Spychalski 2021-06-16 15:52:33 +02:00 committed by GitHub
commit e5fef1aaf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View file

@ -51,5 +51,11 @@
#define EXTENDED_FASTRAM
#endif
#ifdef STM32H7
#define DMA_RAM __attribute__ ((section(".DMA_RAM")))
#else
#define DMA_RAM
#endif
#define STATIC_FASTRAM static FASTRAM
#define STATIC_FASTRAM_UNIT_TESTED STATIC_UNIT_TESTED FASTRAM

View file

@ -31,7 +31,7 @@
#endif
#if defined(STM32H7)
#define ADC_VALUES_ALIGNMENT(def) __attribute__ ((section(".DMA_RAM"))) def __attribute__ ((aligned (32)))
#define ADC_VALUES_ALIGNMENT(def) DMA_RAM def __attribute__ ((aligned (32)))
#else
#define ADC_VALUES_ALIGNMENT(def) def
#endif

View file

@ -91,7 +91,7 @@ typedef struct {
bool requestTelemetry;
} pwmOutputMotor_t;
static pwmOutputPort_t pwmOutputPorts[MAX_PWM_OUTPUT_PORTS];
static DMA_RAM pwmOutputPort_t pwmOutputPorts[MAX_PWM_OUTPUT_PORTS];
static pwmOutputMotor_t motors[MAX_MOTORS];
static motorPwmProtocolTypes_e initMotorProtocol;