2021-11-24 09:18:08 索炜达电子 744
项目编号:E2443
文件大小:21M
源码说明:带中文注释
开发环境:C编译器
简要概述
模拟电磁曲射炮
接口定义
PB10 UART3_TX PB11 UART3_RX
PA9 UART1_TX
PA10 UART1_RX
PA2 UART2_TX
PA3 UART2_RX
PC7 UART6_RX
PC6 UART6_TX
PA5 SCL
PA6 MISO SDO
PA7 MOSI SDI
PC4 SPI1_cs
PF7 TIM11ch1 yaw 挂载在APB2上
PF6 TIM10ch1 pitch 挂载在APB2上 180MHz
PF8 TIM13ch1 pitch 挂载在APB1上 90MHz
TIM2挂载在APB1上
PE2 放电寄存器
PE3 充电寄存器
PH2 KEY1
PH3 KEY0
PE4 舵机隔离继电器
PF9 mpu6050 SCL
PE5 mpu6050 SDA
PE6 mpu6050 INT
文件内容
actuator.c 位置式PID算法、定时器中断服务函数、外部中断服务函数
uart_dma.c uart中断,处理k210传回的数据。激光测距的数据解算代码
gun_action.c 在不同状态下的执行内容、舵机偏转角度函数。
status_transmit.c 状态转移函数
stack.c 用数组实现的栈
attitude_solution.c 陀螺仪数据融合(姿态解算)算法(使用互补滤波算法)
NOTE
mpu6050dmp和定时器中断冲突,所以不适用dmp,mpu6050用来控制follow模式。
icm20602用来pitch闭环控制(放弃)。
两个陀螺仪使用相同的解算方案。
yawpid 0.35 0.01 0.04
目录│文件列表:
└ RAILGUN
│ keilkilll.bat
│ main.py
├ CORE
│ │ cmsis_armcc.h
│ │ core_cm4.h
│ │ core_cmFunc.h
│ │ core_cmInstr.h
│ │ core_cmSimd.h
│ └ startup_stm32f429xx.s
├ HALLIB
│ └ STM32F4xx_HAL_Driver
│ ├ Inc
│ │ │ stm32f4xx_hal.h
│ │ │ stm32f4xx_hal_adc.h
│ │ │ stm32f4xx_hal_adc_ex.h
│ │ │ stm32f4xx_hal_can.h
│ │ │ stm32f4xx_hal_cec.h
│ │ │ stm32f4xx_hal_conf_template.h
│ │ │ stm32f4xx_hal_cortex.h
│ │ │ stm32f4xx_hal_crc.h
│ │ │ stm32f4xx_hal_cryp.h
│ │ │ stm32f4xx_hal_cryp_ex.h
│ │ │ stm32f4xx_hal_dac.h
│ │ │ stm32f4xx_hal_dac_ex.h
│ │ │ stm32f4xx_hal_dcmi.h
│ │ │ stm32f4xx_hal_dcmi_ex.h
│ │ │ stm32f4xx_hal_def.h
│ │ │ stm32f4xx_hal_dma.h
│ │ │ stm32f4xx_hal_dma2d.h
│ │ │ stm32f4xx_hal_dma_ex.h
│ │ │ stm32f4xx_hal_dsi.h
│ │ │ stm32f4xx_hal_eth.h
│ │ │ stm32f4xx_hal_flash.h
│ │ │ stm32f4xx_hal_flash_ex.h
│ │ │ stm32f4xx_hal_flash_ramfunc.h
│ │ │ stm32f4xx_hal_fmpi2c.h
│ │ │ stm32f4xx_hal_fmpi2c_ex.h
│ │ │ stm32f4xx_hal_gpio.h
│ │ │ stm32f4xx_hal_gpio_ex.h
│ │ │ stm32f4xx_hal_hash.h
│ │ │ stm32f4xx_hal_hash_ex.h
│ │ │ stm32f4xx_hal_hcd.h
│ │ │ stm32f4xx_hal_i2c.h
│ │ │ stm32f4xx_hal_i2c_ex.h
│ │ │ stm32f4xx_hal_i2s.h
│ │ │ stm32f4xx_hal_i2s_ex.h
│ │ │ stm32f4xx_hal_irda.h
│ │ │ stm32f4xx_hal_iwdg.h
│ │ │ stm32f4xx_hal_lptim.h
│ │ │ stm32f4xx_hal_ltdc.h
│ │ │ stm32f4xx_hal_ltdc_ex.h
│ │ │ stm32f4xx_hal_nand.h
│ │ │ stm32f4xx_hal_nor.h
│ │ │ stm32f4xx_hal_pccard.h
│ │ │ stm32f4xx_hal_pcd.h
│ │ │ stm32f4xx_hal_pcd_ex.h
│ │ │ stm32f4xx_hal_pwr.h
│ │ │ stm32f4xx_hal_pwr_ex.h
│ │ │ stm32f4xx_hal_qspi.h
│ │ │ stm32f4xx_hal_rcc.h
│ │ │ stm32f4xx_hal_rcc_ex.h
│ │ │ stm32f4xx_hal_rng.h
│ │ │ stm32f4xx_hal_rtc.h
│ │ │ stm32f4xx_hal_rtc_ex.h
│ │ │ stm32f4xx_hal_sai.h
│ │ │ stm32f4xx_hal_sai_ex.h
│ │ │ stm32f4xx_hal_sd.h
│ │ │ stm32f4xx_hal_sdram.h
│ │ │ stm32f4xx_hal_smartcard.h
│ │ │ stm32f4xx_hal_spdifrx.h
│ │ │ stm32f4xx_hal_spi.h
│ │ │ stm32f4xx_hal_sram.h
│ │ │ stm32f4xx_hal_tim.h
│ │ │ stm32f4xx_hal_tim_ex.h
│ │ │ stm32f4xx_hal_uart.h
│ │ │ stm32f4xx_hal_usart.h
│ │ │ stm32f4xx_hal_wwdg.h
│ │ │ stm32f4xx_ll_fmc.h
│ │ │ stm32f4xx_ll_fsmc.h
│ │ │ stm32f4xx_ll_sdmmc.h
│ │ │ stm32f4xx_ll_usb.h
│ │ └ Legacy
│ │ └ stm32_hal_legacy.h
│ └ Src