@[TOC](Aocoda-RC F405V2 FC(STM32F405RGT6 v.s. AT32F435RGT7) IO Definitions)
1. 源由
Aocoda-RC F405V2飞控支持betaflight/inav/Ardupilot固件,是一款固件兼容性非常不错的开源硬件。
之前我们对比过STM32F405RGT6 v.s. AT32F435RGT7 Comparison for Flight Controller,整体对比:
- 性能上显著提升
- 引脚定义基本一致
- 容量上最大支持4MB
通过betaflight开源,可以非常快速的了解硬件的引脚对应关系:
若将该芯片直接替换成AT32F435RGT7,在硬件升级上需要做哪些改动或者调整/优化?
2. 功能引脚对比
STM32F405RGT6飞控引脚连线参考图:
2.1 SPI
2.1.1 Gyro
#define GYRO_1_CS_PIN PA4
#define SPI1_SCK_PIN PA5
#define SPI1_SDI_PIN PA6
#define SPI1_SDO_PIN PA7
#define GYRO_1_EXTI_PIN PC4
2.1.2 OSD
#define MAX7456_SPI_CS_PIN PA13
#define SPI2_SCK_PIN PB13
#define SPI2_SDI_PIN PB14
#define SPI2_SDO_PIN PB15
2.1.3 Flash
#define FLASH_CS_PIN PC0
#define SPI3_SCK_PIN PB3
#define SPI3_SDI_PIN PB4
#define SPI3_SDO_PIN PB5
2.2 I2C
#define I2C1_SCL_PIN PB6
#define I2C1_SDA_PIN PB7
2.3 USB
#define USB_DETECT_PIN PB12
2.4 UART
# The normal usage of this ordering is:
# 1) SERIAL0: console (primary mavlink, usually USB)
# 2) SERIAL1: GPS
# 3) SERIAL2: RC input
# 4) SERIAL3: ESC Telemetry
# 5) SERIAL4: VTX
# 6) SERIAL5: Telemetry
2.4.1 UART1
#define UART1_TX_PIN PA9
#define UART1_RX_PIN PA10
2.4.2 UART2
#define UART2_TX_PIN PA2
#define UART2_RX_PIN PA3
注:PA3有定时器资源,可用于单线协议。
2.4.3 UART3
#define UART3_TX_PIN PC10
#define UART3_RX_PIN PC11
2.4.4 UART4
#define UART4_TX_PIN PA0
#define UART4_RX_PIN PA1
2.4.5 UART5
#define UART5_TX_PIN PC12
#define UART5_RX_PIN PD2
2.5 Motor
#define MOTOR1_PIN PC6
#define MOTOR2_PIN PC7
#define MOTOR3_PIN PC8
#define MOTOR4_PIN PC9
#define MOTOR5_PIN PA15
#define MOTOR6_PIN PA8
#define MOTOR7_PIN PB10
#define MOTOR8_PIN PB11
TIMER_PIN_MAP( 1, PC6 , 2, 1) \
TIMER_PIN_MAP( 2, PC7 , 2, 1) \
TIMER_PIN_MAP( 3, PC8 , 2, 1) \
TIMER_PIN_MAP( 4, PC9 , 2, 0) \
TIMER_PIN_MAP( 5, PA15, 1, 0) \
TIMER_PIN_MAP( 6, PA8 , 1, 1) \
TIMER_PIN_MAP( 7, PB10, 1, 0) \
TIMER_PIN_MAP( 8, PB11, 1, 0) \
2.6 ADC
#define ADC_VBAT_PIN PC2
#define ADC_RSSI_PIN PC3
#define ADC_CURR_PIN PC1
2.7 LED & LED stripe
2.7.1 LED
#define LED0_PIN PC13
2.7.2 LED stripe
#define LED_STRIP_PIN PB1
TIMER_PIN_MAP( 9, PB1 , 2, 0)
2.8 Buzzer
#define BEEPER_PIN PB8
3. 总结
3.1 电气特性差异
-
STM32F405RGT6 : VCAP_1/VCAP_2
-
AT32F435RGT7: PH3/PH2
3.2 功能引脚差异
基本一致。
3.3 未使用功能引脚
4. 参考资料
【1】STM32F405/415
【2】AT32F435 Series
【3】STM32F405RGT6 v.s. AT32F435RGT7 Comparison for Flight Controller