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:
parent
facf44b406
commit
0ac9962bd4
2 changed files with 17 additions and 3 deletions
|
@ -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();
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue