1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Enable DMA on AT32F435 SPI (#12327)

This commit is contained in:
Steve Evans 2023-02-08 20:54:41 +00:00 committed by GitHub
parent facf44b406
commit 0ac9962bd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 3 deletions

View file

@ -1021,7 +1021,7 @@ void init(void)
#endif #endif
// On H7/G4 allocate SPI DMA streams after motor timers as SPI DMA allocate will always be possible // On H7/G4 allocate SPI DMA streams after motor timers as SPI DMA allocate will always be possible
#if defined(STM32H7) || defined(STM32G4) #if defined(STM32H7) || defined(STM32G4) || defined(AT32F435)
#ifdef USE_SPI #ifdef USE_SPI
// Attempt to enable DMA on all SPI busses // Attempt to enable DMA on all SPI busses
spiInitBusDMA(); spiInitBusDMA();

View file

@ -54,9 +54,23 @@
//#define I2C_FULL_RECONFIGURABILITY //#define I2C_FULL_RECONFIGURABILITY
#define USE_SPI #define USE_SPI
#define USE_SPI_DEVICE_1
#define USE_SPI_DEVICE_2 #define USE_SPI_DEVICE_2
#define SPI_FULL_RECONFIGURABILITY
// AT-START-F435 J7 connector SPI 1
#define SPI2_SCK_PIN PD1
#define SPI2_MISO_PIN PC2
#define SPI2_MOSI_PIN PD4
#define J7_NSS PD0
#define GYRO_1_CS_PIN J7_NSS
#define GYRO_1_SPI_INSTANCE SPI2
#define USE_EXTI
#define USE_GYRO_EXTI
#define GYRO_1_EXTI_PIN PB11
#define USE_ACCGYRO_BMI160
//#define USE_USB_DETECT //#define USE_USB_DETECT
#define USE_VCP #define USE_VCP