diff --git a/.Doc/版本更替.md b/.Doc/版本更替.md new file mode 100644 index 0000000..be11b39 --- /dev/null +++ b/.Doc/版本更替.md @@ -0,0 +1,9 @@ +# 版本更替 + +随着比赛的推进,我们的代码也在不断的更新,在不同的结点下会发布稳定可用版本,以便于大家使用。 + +指路gitee release页面:[https://gitee.com/hnuyuelurm/basic_framework/tags](https://gitee.com/hnuyuelurm/basic_framework/tags) + +release页面会有一个版本号,例如`v1.0`,这个版本号就是我们的代码版本号,每次发布新的版本,版本号都会增加。 + +第一次使用尽量避免直接clone \ No newline at end of file diff --git a/.mxproject b/.mxproject index 1490176..5d69fd2 100644 --- a/.mxproject +++ b/.mxproject @@ -1,12 +1,17 @@ +[PreviousLibFiles] +LibFiles=Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pcd.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pcd_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usb.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_adc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_adc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_adc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_can.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_crc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_crc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dac.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dac.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dac_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_i2c.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_i2c.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_i2c_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rng.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rng.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rtc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rtc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rtc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_spi.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_tim.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Middlewares\Third_Party\FreeRTOS\Source\include\croutine.h;Middlewares\Third_Party\FreeRTOS\Source\include\deprecated_definitions.h;Middlewares\Third_Party\FreeRTOS\Source\include\event_groups.h;Middlewares\Third_Party\FreeRTOS\Source\include\FreeRTOS.h;Middlewares\Third_Party\FreeRTOS\Source\include\list.h;Middlewares\Third_Party\FreeRTOS\Source\include\message_buffer.h;Middlewares\Third_Party\FreeRTOS\Source\include\mpu_prototypes.h;Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h;Middlewares\Third_Party\FreeRTOS\Source\include\portable.h;Middlewares\Third_Party\FreeRTOS\Source\include\projdefs.h;Middlewares\Third_Party\FreeRTOS\Source\include\queue.h;Middlewares\Third_Party\FreeRTOS\Source\include\semphr.h;Middlewares\Third_Party\FreeRTOS\Source\include\stack_macros.h;Middlewares\Third_Party\FreeRTOS\Source\include\StackMacros.h;Middlewares\Third_Party\FreeRTOS\Source\include\stream_buffer.h;Middlewares\Third_Party\FreeRTOS\Source\include\task.h;Middlewares\Third_Party\FreeRTOS\Source\include\timers.h;Middlewares\Third_Party\FreeRTOS\Source\include\atomic.h;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.h;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\portmacro.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_core.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_ctlreq.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_def.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_ioreq.h;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Inc\usbd_cdc.h;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_usb.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_adc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_adc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_adc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_can.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_crc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dac.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dac_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rng.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rtc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rtc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_spi.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Middlewares\Third_Party\FreeRTOS\Source\croutine.c;Middlewares\Third_Party\FreeRTOS\Source\event_groups.c;Middlewares\Third_Party\FreeRTOS\Source\list.c;Middlewares\Third_Party\FreeRTOS\Source\queue.c;Middlewares\Third_Party\FreeRTOS\Source\stream_buffer.c;Middlewares\Third_Party\FreeRTOS\Source\tasks.c;Middlewares\Third_Party\FreeRTOS\Source\timers.c;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.c;Middlewares\Third_Party\FreeRTOS\Source\portable\MemMang\heap_4.c;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_core.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ctlreq.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ioreq.c;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Src\usbd_cdc.c;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pcd.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pcd_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usb.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_adc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_adc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_adc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_can.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_crc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_crc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dac.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dac.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dac_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_i2c.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_i2c.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_i2c_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rng.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rng.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rtc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rtc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rtc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_spi.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_tim.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Middlewares\Third_Party\FreeRTOS\Source\include\croutine.h;Middlewares\Third_Party\FreeRTOS\Source\include\deprecated_definitions.h;Middlewares\Third_Party\FreeRTOS\Source\include\event_groups.h;Middlewares\Third_Party\FreeRTOS\Source\include\FreeRTOS.h;Middlewares\Third_Party\FreeRTOS\Source\include\list.h;Middlewares\Third_Party\FreeRTOS\Source\include\message_buffer.h;Middlewares\Third_Party\FreeRTOS\Source\include\mpu_prototypes.h;Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h;Middlewares\Third_Party\FreeRTOS\Source\include\portable.h;Middlewares\Third_Party\FreeRTOS\Source\include\projdefs.h;Middlewares\Third_Party\FreeRTOS\Source\include\queue.h;Middlewares\Third_Party\FreeRTOS\Source\include\semphr.h;Middlewares\Third_Party\FreeRTOS\Source\include\stack_macros.h;Middlewares\Third_Party\FreeRTOS\Source\include\StackMacros.h;Middlewares\Third_Party\FreeRTOS\Source\include\stream_buffer.h;Middlewares\Third_Party\FreeRTOS\Source\include\task.h;Middlewares\Third_Party\FreeRTOS\Source\include\timers.h;Middlewares\Third_Party\FreeRTOS\Source\include\atomic.h;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.h;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\portmacro.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_core.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_ctlreq.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_def.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_ioreq.h;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Inc\usbd_cdc.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f407xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\tz_context.h; + +[PreviousUsedMakefileFiles] +SourceFiles=Src\main.c;Src\gpio.c;Src\freertos.c;Src\adc.c;Src\can.c;Src\crc.c;Src\dac.c;Src\dma.c;Src\i2c.c;Src\rng.c;Src\rtc.c;Src\spi.c;Src\tim.c;Src\usart.c;Src\usb_device.c;Src\usbd_conf.c;Src\usbd_desc.c;Src\usbd_cdc_if.c;Src\stm32f4xx_it.c;Src\stm32f4xx_hal_msp.c;Src\stm32f4xx_hal_timebase_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_usb.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_adc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_adc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_adc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_can.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_crc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dac.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dac_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rng.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rtc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rtc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_spi.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Middlewares\Third_Party\FreeRTOS\Source\croutine.c;Middlewares\Third_Party\FreeRTOS\Source\event_groups.c;Middlewares\Third_Party\FreeRTOS\Source\list.c;Middlewares\Third_Party\FreeRTOS\Source\queue.c;Middlewares\Third_Party\FreeRTOS\Source\stream_buffer.c;Middlewares\Third_Party\FreeRTOS\Source\tasks.c;Middlewares\Third_Party\FreeRTOS\Source\timers.c;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.c;Middlewares\Third_Party\FreeRTOS\Source\portable\MemMang\heap_4.c;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_core.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ctlreq.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ioreq.c;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Src\usbd_cdc.c;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Src\system_stm32f4xx.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_usb.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_adc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_adc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_adc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_can.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_crc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dac.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dac_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rng.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rtc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rtc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_spi.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Middlewares\Third_Party\FreeRTOS\Source\croutine.c;Middlewares\Third_Party\FreeRTOS\Source\event_groups.c;Middlewares\Third_Party\FreeRTOS\Source\list.c;Middlewares\Third_Party\FreeRTOS\Source\queue.c;Middlewares\Third_Party\FreeRTOS\Source\stream_buffer.c;Middlewares\Third_Party\FreeRTOS\Source\tasks.c;Middlewares\Third_Party\FreeRTOS\Source\timers.c;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.c;Middlewares\Third_Party\FreeRTOS\Source\portable\MemMang\heap_4.c;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_core.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ctlreq.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ioreq.c;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Src\usbd_cdc.c;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Src\system_stm32f4xx.c;;;Middlewares\Third_Party\FreeRTOS\Source\croutine.c;Middlewares\Third_Party\FreeRTOS\Source\event_groups.c;Middlewares\Third_Party\FreeRTOS\Source\list.c;Middlewares\Third_Party\FreeRTOS\Source\queue.c;Middlewares\Third_Party\FreeRTOS\Source\stream_buffer.c;Middlewares\Third_Party\FreeRTOS\Source\tasks.c;Middlewares\Third_Party\FreeRTOS\Source\timers.c;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.c;Middlewares\Third_Party\FreeRTOS\Source\portable\MemMang\heap_4.c;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_core.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ctlreq.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ioreq.c;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Src\usbd_cdc.c; +HeaderPath=Drivers\STM32F4xx_HAL_Driver\Inc;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy;Middlewares\Third_Party\FreeRTOS\Source\include;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F;Middlewares\ST\STM32_USB_Device_Library\Core\Inc;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Inc;Drivers\CMSIS\Device\ST\STM32F4xx\Include;Drivers\CMSIS\Include;Middlewares\ST\ARM\DSP\Inc;Inc; +CDefines=USE_HAL_DRIVER;STM32F407xx;USE_HAL_DRIVER;USE_HAL_DRIVER; + [PreviousGenFiles] HeaderPath=..\Inc HeaderFiles=gpio.h;FreeRTOSConfig.h;adc.h;can.h;crc.h;dac.h;dma.h;i2c.h;rng.h;rtc.h;spi.h;tim.h;usart.h;usb_device.h;usbd_conf.h;usbd_desc.h;usbd_cdc_if.h;stm32f4xx_it.h;stm32f4xx_hal_conf.h;main.h; SourcePath=..\Src SourceFiles=gpio.c;freertos.c;adc.c;can.c;crc.c;dac.c;dma.c;i2c.c;rng.c;rtc.c;spi.c;tim.c;usart.c;usb_device.c;usbd_conf.c;usbd_desc.c;usbd_cdc_if.c;stm32f4xx_it.c;stm32f4xx_hal_msp.c;stm32f4xx_hal_timebase_tim.c;main.c; -[PreviousLibFiles] -LibFiles=Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pcd.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pcd_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usb.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_adc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_adc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_adc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_can.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_crc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_crc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dac.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dac.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dac_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_i2c.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_i2c.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_i2c_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rng.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rng.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rtc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rtc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rtc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_spi.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_tim.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Middlewares\Third_Party\FreeRTOS\Source\include\croutine.h;Middlewares\Third_Party\FreeRTOS\Source\include\deprecated_definitions.h;Middlewares\Third_Party\FreeRTOS\Source\include\event_groups.h;Middlewares\Third_Party\FreeRTOS\Source\include\FreeRTOS.h;Middlewares\Third_Party\FreeRTOS\Source\include\list.h;Middlewares\Third_Party\FreeRTOS\Source\include\message_buffer.h;Middlewares\Third_Party\FreeRTOS\Source\include\mpu_prototypes.h;Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h;Middlewares\Third_Party\FreeRTOS\Source\include\portable.h;Middlewares\Third_Party\FreeRTOS\Source\include\projdefs.h;Middlewares\Third_Party\FreeRTOS\Source\include\queue.h;Middlewares\Third_Party\FreeRTOS\Source\include\semphr.h;Middlewares\Third_Party\FreeRTOS\Source\include\stack_macros.h;Middlewares\Third_Party\FreeRTOS\Source\include\StackMacros.h;Middlewares\Third_Party\FreeRTOS\Source\include\stream_buffer.h;Middlewares\Third_Party\FreeRTOS\Source\include\task.h;Middlewares\Third_Party\FreeRTOS\Source\include\timers.h;Middlewares\Third_Party\FreeRTOS\Source\include\atomic.h;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.h;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\portmacro.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_core.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_ctlreq.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_def.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_ioreq.h;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Inc\usbd_cdc.h;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_usb.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_adc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_adc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_adc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_can.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_crc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dac.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dac_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rng.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rtc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rtc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_spi.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Middlewares\Third_Party\FreeRTOS\Source\croutine.c;Middlewares\Third_Party\FreeRTOS\Source\event_groups.c;Middlewares\Third_Party\FreeRTOS\Source\list.c;Middlewares\Third_Party\FreeRTOS\Source\queue.c;Middlewares\Third_Party\FreeRTOS\Source\stream_buffer.c;Middlewares\Third_Party\FreeRTOS\Source\tasks.c;Middlewares\Third_Party\FreeRTOS\Source\timers.c;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.c;Middlewares\Third_Party\FreeRTOS\Source\portable\MemMang\heap_4.c;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_core.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ctlreq.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ioreq.c;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Src\usbd_cdc.c;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pcd.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pcd_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usb.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_bus.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rcc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_system.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_utils.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_gpio.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dma.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dmamux.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_pwr.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_cortex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy\stm32_hal_legacy.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_exti.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_adc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_adc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_adc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_can.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_crc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_crc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dac.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_dac.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_dac_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_i2c.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_i2c.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_i2c_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rng.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rng.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rtc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_rtc.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rtc_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_spi.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_tim_ex.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_tim.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h;Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_ll_usart.h;Middlewares\Third_Party\FreeRTOS\Source\include\croutine.h;Middlewares\Third_Party\FreeRTOS\Source\include\deprecated_definitions.h;Middlewares\Third_Party\FreeRTOS\Source\include\event_groups.h;Middlewares\Third_Party\FreeRTOS\Source\include\FreeRTOS.h;Middlewares\Third_Party\FreeRTOS\Source\include\list.h;Middlewares\Third_Party\FreeRTOS\Source\include\message_buffer.h;Middlewares\Third_Party\FreeRTOS\Source\include\mpu_prototypes.h;Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h;Middlewares\Third_Party\FreeRTOS\Source\include\portable.h;Middlewares\Third_Party\FreeRTOS\Source\include\projdefs.h;Middlewares\Third_Party\FreeRTOS\Source\include\queue.h;Middlewares\Third_Party\FreeRTOS\Source\include\semphr.h;Middlewares\Third_Party\FreeRTOS\Source\include\stack_macros.h;Middlewares\Third_Party\FreeRTOS\Source\include\StackMacros.h;Middlewares\Third_Party\FreeRTOS\Source\include\stream_buffer.h;Middlewares\Third_Party\FreeRTOS\Source\include\task.h;Middlewares\Third_Party\FreeRTOS\Source\include\timers.h;Middlewares\Third_Party\FreeRTOS\Source\include\atomic.h;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.h;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\portmacro.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_core.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_ctlreq.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_def.h;Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_ioreq.h;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Inc\usbd_cdc.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f407xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Drivers\CMSIS\Include\cmsis_armcc.h;Drivers\CMSIS\Include\cmsis_armclang.h;Drivers\CMSIS\Include\cmsis_compiler.h;Drivers\CMSIS\Include\cmsis_gcc.h;Drivers\CMSIS\Include\cmsis_iccarm.h;Drivers\CMSIS\Include\cmsis_version.h;Drivers\CMSIS\Include\core_armv8mbl.h;Drivers\CMSIS\Include\core_armv8mml.h;Drivers\CMSIS\Include\core_cm0.h;Drivers\CMSIS\Include\core_cm0plus.h;Drivers\CMSIS\Include\core_cm1.h;Drivers\CMSIS\Include\core_cm23.h;Drivers\CMSIS\Include\core_cm3.h;Drivers\CMSIS\Include\core_cm33.h;Drivers\CMSIS\Include\core_cm4.h;Drivers\CMSIS\Include\core_cm7.h;Drivers\CMSIS\Include\core_sc000.h;Drivers\CMSIS\Include\core_sc300.h;Drivers\CMSIS\Include\mpu_armv7.h;Drivers\CMSIS\Include\mpu_armv8.h;Drivers\CMSIS\Include\tz_context.h; - [ThirdPartyIp] ThirdPartyIpNumber=1 ThirdPartyIpName#0=STMicroelectronics.X-CUBE-ALGOBUILD.1.3.0 @@ -15,8 +20,3 @@ ThirdPartyIpName#0=STMicroelectronics.X-CUBE-ALGOBUILD.1.3.0 library=..\Middlewares\ST\ARM\DSP\Lib\libarm_cortexM4lf_math.a; header=..\Middlewares\ST\ARM\DSP\Inc\arm_math.h; -[PreviousUsedMakefileFiles] -SourceFiles=Src\main.c;Src\gpio.c;Src\freertos.c;Src\adc.c;Src\can.c;Src\crc.c;Src\dac.c;Src\dma.c;Src\i2c.c;Src\rng.c;Src\rtc.c;Src\spi.c;Src\tim.c;Src\usart.c;Src\usb_device.c;Src\usbd_conf.c;Src\usbd_desc.c;Src\usbd_cdc_if.c;Src\stm32f4xx_it.c;Src\stm32f4xx_hal_msp.c;Src\stm32f4xx_hal_timebase_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_usb.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_adc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_adc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_adc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_can.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_crc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dac.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dac_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rng.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rtc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rtc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_spi.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Middlewares\Third_Party\FreeRTOS\Source\croutine.c;Middlewares\Third_Party\FreeRTOS\Source\event_groups.c;Middlewares\Third_Party\FreeRTOS\Source\list.c;Middlewares\Third_Party\FreeRTOS\Source\queue.c;Middlewares\Third_Party\FreeRTOS\Source\stream_buffer.c;Middlewares\Third_Party\FreeRTOS\Source\tasks.c;Middlewares\Third_Party\FreeRTOS\Source\timers.c;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.c;Middlewares\Third_Party\FreeRTOS\Source\portable\MemMang\heap_4.c;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_core.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ctlreq.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ioreq.c;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Src\usbd_cdc.c;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Src\system_stm32f4xx.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pcd_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_usb.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_flash_ramfunc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_exti.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_adc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_adc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_ll_adc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_can.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_crc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dac.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dac_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rng.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rtc.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rtc_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_spi.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c;Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c;Middlewares\Third_Party\FreeRTOS\Source\croutine.c;Middlewares\Third_Party\FreeRTOS\Source\event_groups.c;Middlewares\Third_Party\FreeRTOS\Source\list.c;Middlewares\Third_Party\FreeRTOS\Source\queue.c;Middlewares\Third_Party\FreeRTOS\Source\stream_buffer.c;Middlewares\Third_Party\FreeRTOS\Source\tasks.c;Middlewares\Third_Party\FreeRTOS\Source\timers.c;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.c;Middlewares\Third_Party\FreeRTOS\Source\portable\MemMang\heap_4.c;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_core.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ctlreq.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ioreq.c;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Src\usbd_cdc.c;Drivers\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c;Src\system_stm32f4xx.c;;;Middlewares\Third_Party\FreeRTOS\Source\croutine.c;Middlewares\Third_Party\FreeRTOS\Source\event_groups.c;Middlewares\Third_Party\FreeRTOS\Source\list.c;Middlewares\Third_Party\FreeRTOS\Source\queue.c;Middlewares\Third_Party\FreeRTOS\Source\stream_buffer.c;Middlewares\Third_Party\FreeRTOS\Source\tasks.c;Middlewares\Third_Party\FreeRTOS\Source\timers.c;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS\cmsis_os.c;Middlewares\Third_Party\FreeRTOS\Source\portable\MemMang\heap_4.c;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F\port.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_core.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ctlreq.c;Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ioreq.c;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Src\usbd_cdc.c; -HeaderPath=Drivers\STM32F4xx_HAL_Driver\Inc;Drivers\STM32F4xx_HAL_Driver\Inc\Legacy;Middlewares\Third_Party\FreeRTOS\Source\include;Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS;Middlewares\Third_Party\FreeRTOS\Source\portable\GCC\ARM_CM4F;Middlewares\ST\STM32_USB_Device_Library\Core\Inc;Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Inc;Drivers\CMSIS\Device\ST\STM32F4xx\Include;Drivers\CMSIS\Include;Middlewares\ST\ARM\DSP\Inc;Inc; -CDefines=USE_HAL_DRIVER;STM32F407xx;USE_HAL_DRIVER;USE_HAL_DRIVER; - diff --git a/Inc/stm32f4xx_it.h b/Inc/stm32f4xx_it.h index 86acaac..2cec665 100644 --- a/Inc/stm32f4xx_it.h +++ b/Inc/stm32f4xx_it.h @@ -57,8 +57,6 @@ void EXTI3_IRQHandler(void); void EXTI4_IRQHandler(void); void DMA1_Stream1_IRQHandler(void); void DMA1_Stream2_IRQHandler(void); -void DMA1_Stream3_IRQHandler(void); -void DMA1_Stream4_IRQHandler(void); void CAN1_RX0_IRQHandler(void); void CAN1_RX1_IRQHandler(void); void EXTI9_5_IRQHandler(void); @@ -73,7 +71,6 @@ void DMA1_Stream7_IRQHandler(void); void DMA2_Stream0_IRQHandler(void); void DMA2_Stream2_IRQHandler(void); void DMA2_Stream3_IRQHandler(void); -void DMA2_Stream4_IRQHandler(void); void CAN2_RX0_IRQHandler(void); void CAN2_RX1_IRQHandler(void); void OTG_FS_IRQHandler(void); diff --git a/Makefile b/Makefile index 02814aa..a79f07e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ########################################################################################################################## -# File automatically-generated by tool: [projectgenerator] version: [3.18.0-B7] date: [Thu Apr 13 18:20:17 CST 2023] +# File automatically-generated by tool: [projectgenerator] version: [3.19.2] date: [Sat Dec 09 14:32:18 CST 2023] ########################################################################################################################## # ------------------------------------------------ diff --git a/Src/adc.c b/Src/adc.c index 864e3c4..0a50534 100644 --- a/Src/adc.c +++ b/Src/adc.c @@ -25,7 +25,6 @@ /* USER CODE END 0 */ ADC_HandleTypeDef hadc1; -DMA_HandleTypeDef hdma_adc1; /* ADC1 init function */ void MX_ADC1_Init(void) @@ -85,26 +84,6 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef* adcHandle) /* USER CODE END ADC1_MspInit 0 */ /* ADC1 clock enable */ __HAL_RCC_ADC1_CLK_ENABLE(); - - /* ADC1 DMA Init */ - /* ADC1 Init */ - hdma_adc1.Instance = DMA2_Stream4; - hdma_adc1.Init.Channel = DMA_CHANNEL_0; - hdma_adc1.Init.Direction = DMA_PERIPH_TO_MEMORY; - hdma_adc1.Init.PeriphInc = DMA_PINC_DISABLE; - hdma_adc1.Init.MemInc = DMA_MINC_ENABLE; - hdma_adc1.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD; - hdma_adc1.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD; - hdma_adc1.Init.Mode = DMA_NORMAL; - hdma_adc1.Init.Priority = DMA_PRIORITY_LOW; - hdma_adc1.Init.FIFOMode = DMA_FIFOMODE_DISABLE; - if (HAL_DMA_Init(&hdma_adc1) != HAL_OK) - { - Error_Handler(); - } - - __HAL_LINKDMA(adcHandle,DMA_Handle,hdma_adc1); - /* USER CODE BEGIN ADC1_MspInit 1 */ /* USER CODE END ADC1_MspInit 1 */ @@ -121,9 +100,6 @@ void HAL_ADC_MspDeInit(ADC_HandleTypeDef* adcHandle) /* USER CODE END ADC1_MspDeInit 0 */ /* Peripheral clock disable */ __HAL_RCC_ADC1_CLK_DISABLE(); - - /* ADC1 DMA DeInit */ - HAL_DMA_DeInit(adcHandle->DMA_Handle); /* USER CODE BEGIN ADC1_MspDeInit 1 */ /* USER CODE END ADC1_MspDeInit 1 */ diff --git a/Src/dma.c b/Src/dma.c index a1959ee..ce17500 100644 --- a/Src/dma.c +++ b/Src/dma.c @@ -50,29 +50,20 @@ void MX_DMA_Init(void) /* DMA1_Stream2_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Stream2_IRQn, 5, 0); HAL_NVIC_EnableIRQ(DMA1_Stream2_IRQn); - /* DMA1_Stream3_IRQn interrupt configuration */ - HAL_NVIC_SetPriority(DMA1_Stream3_IRQn, 5, 0); - HAL_NVIC_EnableIRQ(DMA1_Stream3_IRQn); - /* DMA1_Stream4_IRQn interrupt configuration */ - HAL_NVIC_SetPriority(DMA1_Stream4_IRQn, 5, 0); - HAL_NVIC_EnableIRQ(DMA1_Stream4_IRQn); /* DMA1_Stream7_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Stream7_IRQn, 5, 0); HAL_NVIC_EnableIRQ(DMA1_Stream7_IRQn); /* DMA2_Stream0_IRQn interrupt configuration */ - HAL_NVIC_SetPriority(DMA2_Stream0_IRQn, 5, 0); + HAL_NVIC_SetPriority(DMA2_Stream0_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA2_Stream0_IRQn); /* DMA2_Stream2_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA2_Stream2_IRQn, 5, 0); HAL_NVIC_EnableIRQ(DMA2_Stream2_IRQn); /* DMA2_Stream3_IRQn interrupt configuration */ - HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, 5, 0); + HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA2_Stream3_IRQn); - /* DMA2_Stream4_IRQn interrupt configuration */ - HAL_NVIC_SetPriority(DMA2_Stream4_IRQn, 5, 0); - HAL_NVIC_EnableIRQ(DMA2_Stream4_IRQn); /* DMA2_Stream5_IRQn interrupt configuration */ - HAL_NVIC_SetPriority(DMA2_Stream5_IRQn, 5, 0); + HAL_NVIC_SetPriority(DMA2_Stream5_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA2_Stream5_IRQn); /* DMA2_Stream6_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA2_Stream6_IRQn, 5, 0); diff --git a/Src/spi.c b/Src/spi.c index d4680c8..ea60ff8 100644 --- a/Src/spi.c +++ b/Src/spi.c @@ -28,8 +28,6 @@ SPI_HandleTypeDef hspi1; SPI_HandleTypeDef hspi2; DMA_HandleTypeDef hdma_spi1_rx; DMA_HandleTypeDef hdma_spi1_tx; -DMA_HandleTypeDef hdma_spi2_rx; -DMA_HandleTypeDef hdma_spi2_tx; /* SPI1 init function */ void MX_SPI1_Init(void) @@ -139,7 +137,7 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle) hdma_spi1_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; hdma_spi1_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; hdma_spi1_rx.Init.Mode = DMA_NORMAL; - hdma_spi1_rx.Init.Priority = DMA_PRIORITY_LOW; + hdma_spi1_rx.Init.Priority = DMA_PRIORITY_HIGH; hdma_spi1_rx.Init.FIFOMode = DMA_FIFOMODE_ENABLE; hdma_spi1_rx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; hdma_spi1_rx.Init.MemBurst = DMA_MBURST_SINGLE; @@ -160,7 +158,7 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle) hdma_spi1_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; hdma_spi1_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; hdma_spi1_tx.Init.Mode = DMA_NORMAL; - hdma_spi1_tx.Init.Priority = DMA_PRIORITY_LOW; + hdma_spi1_tx.Init.Priority = DMA_PRIORITY_HIGH; hdma_spi1_tx.Init.FIFOMode = DMA_FIFOMODE_DISABLE; if (HAL_DMA_Init(&hdma_spi1_tx) != HAL_OK) { @@ -197,49 +195,6 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle) GPIO_InitStruct.Alternate = GPIO_AF5_SPI2; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); - /* SPI2 DMA Init */ - /* SPI2_RX Init */ - hdma_spi2_rx.Instance = DMA1_Stream3; - hdma_spi2_rx.Init.Channel = DMA_CHANNEL_0; - hdma_spi2_rx.Init.Direction = DMA_PERIPH_TO_MEMORY; - hdma_spi2_rx.Init.PeriphInc = DMA_PINC_DISABLE; - hdma_spi2_rx.Init.MemInc = DMA_MINC_ENABLE; - hdma_spi2_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; - hdma_spi2_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; - hdma_spi2_rx.Init.Mode = DMA_NORMAL; - hdma_spi2_rx.Init.Priority = DMA_PRIORITY_LOW; - hdma_spi2_rx.Init.FIFOMode = DMA_FIFOMODE_ENABLE; - hdma_spi2_rx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; - hdma_spi2_rx.Init.MemBurst = DMA_MBURST_SINGLE; - hdma_spi2_rx.Init.PeriphBurst = DMA_PBURST_SINGLE; - if (HAL_DMA_Init(&hdma_spi2_rx) != HAL_OK) - { - Error_Handler(); - } - - __HAL_LINKDMA(spiHandle,hdmarx,hdma_spi2_rx); - - /* SPI2_TX Init */ - hdma_spi2_tx.Instance = DMA1_Stream4; - hdma_spi2_tx.Init.Channel = DMA_CHANNEL_0; - hdma_spi2_tx.Init.Direction = DMA_MEMORY_TO_PERIPH; - hdma_spi2_tx.Init.PeriphInc = DMA_PINC_DISABLE; - hdma_spi2_tx.Init.MemInc = DMA_MINC_ENABLE; - hdma_spi2_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; - hdma_spi2_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; - hdma_spi2_tx.Init.Mode = DMA_NORMAL; - hdma_spi2_tx.Init.Priority = DMA_PRIORITY_LOW; - hdma_spi2_tx.Init.FIFOMode = DMA_FIFOMODE_ENABLE; - hdma_spi2_tx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; - hdma_spi2_tx.Init.MemBurst = DMA_MBURST_SINGLE; - hdma_spi2_tx.Init.PeriphBurst = DMA_PBURST_SINGLE; - if (HAL_DMA_Init(&hdma_spi2_tx) != HAL_OK) - { - Error_Handler(); - } - - __HAL_LINKDMA(spiHandle,hdmatx,hdma_spi2_tx); - /* SPI2 interrupt Init */ HAL_NVIC_SetPriority(SPI2_IRQn, 5, 0); HAL_NVIC_EnableIRQ(SPI2_IRQn); @@ -294,10 +249,6 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* spiHandle) */ HAL_GPIO_DeInit(GPIOB, GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15); - /* SPI2 DMA DeInit */ - HAL_DMA_DeInit(spiHandle->hdmarx); - HAL_DMA_DeInit(spiHandle->hdmatx); - /* SPI2 interrupt Deinit */ HAL_NVIC_DisableIRQ(SPI2_IRQn); /* USER CODE BEGIN SPI2_MspDeInit 1 */ diff --git a/Src/stm32f4xx_it.c b/Src/stm32f4xx_it.c index fb06c6d..ee40bdc 100644 --- a/Src/stm32f4xx_it.c +++ b/Src/stm32f4xx_it.c @@ -56,7 +56,6 @@ /* External variables --------------------------------------------------------*/ extern PCD_HandleTypeDef hpcd_USB_OTG_FS; -extern DMA_HandleTypeDef hdma_adc1; extern CAN_HandleTypeDef hcan1; extern CAN_HandleTypeDef hcan2; extern DMA_HandleTypeDef hdma_i2c2_rx; @@ -65,8 +64,6 @@ extern I2C_HandleTypeDef hi2c2; extern I2C_HandleTypeDef hi2c3; extern DMA_HandleTypeDef hdma_spi1_rx; extern DMA_HandleTypeDef hdma_spi1_tx; -extern DMA_HandleTypeDef hdma_spi2_rx; -extern DMA_HandleTypeDef hdma_spi2_tx; extern SPI_HandleTypeDef hspi1; extern SPI_HandleTypeDef hspi2; extern TIM_HandleTypeDef htim8; @@ -253,34 +250,6 @@ void DMA1_Stream2_IRQHandler(void) /* USER CODE END DMA1_Stream2_IRQn 1 */ } -/** - * @brief This function handles DMA1 stream3 global interrupt. - */ -void DMA1_Stream3_IRQHandler(void) -{ - /* USER CODE BEGIN DMA1_Stream3_IRQn 0 */ - - /* USER CODE END DMA1_Stream3_IRQn 0 */ - HAL_DMA_IRQHandler(&hdma_spi2_rx); - /* USER CODE BEGIN DMA1_Stream3_IRQn 1 */ - - /* USER CODE END DMA1_Stream3_IRQn 1 */ -} - -/** - * @brief This function handles DMA1 stream4 global interrupt. - */ -void DMA1_Stream4_IRQHandler(void) -{ - /* USER CODE BEGIN DMA1_Stream4_IRQn 0 */ - - /* USER CODE END DMA1_Stream4_IRQn 0 */ - HAL_DMA_IRQHandler(&hdma_spi2_tx); - /* USER CODE BEGIN DMA1_Stream4_IRQn 1 */ - - /* USER CODE END DMA1_Stream4_IRQn 1 */ -} - /** * @brief This function handles CAN1 RX0 interrupts. */ @@ -478,20 +447,6 @@ void DMA2_Stream3_IRQHandler(void) /* USER CODE END DMA2_Stream3_IRQn 1 */ } -/** - * @brief This function handles DMA2 stream4 global interrupt. - */ -void DMA2_Stream4_IRQHandler(void) -{ - /* USER CODE BEGIN DMA2_Stream4_IRQn 0 */ - - /* USER CODE END DMA2_Stream4_IRQn 0 */ - HAL_DMA_IRQHandler(&hdma_adc1); - /* USER CODE BEGIN DMA2_Stream4_IRQn 1 */ - - /* USER CODE END DMA2_Stream4_IRQn 1 */ -} - /** * @brief This function handles CAN2 RX0 interrupts. */ diff --git a/application/cmd/robot_cmd.c b/application/cmd/robot_cmd.c index ee9d3b9..49bd404 100644 --- a/application/cmd/robot_cmd.c +++ b/application/cmd/robot_cmd.c @@ -46,7 +46,7 @@ static Shoot_Upload_Data_s shoot_fetch_data; // 从发射获取的反馈信息 static Robot_Status_e robot_state; // 机器人整体工作状态 -BMI088Instance *bmi088; // 云台IMU +BMI088Instance *bmi088_test; // 云台IMU BMI088_Data_t bmi088_data; void RobotCMDInit() { @@ -57,7 +57,7 @@ void RobotCMDInit() .spi_handle = &hspi1, .GPIOx = GPIOA, .cs_pin = GPIO_PIN_4, - .spi_work_mode = SPI_IT_MODE, + .spi_work_mode = SPI_DMA_MODE, }, .acc_int_config = { .GPIOx = GPIOC, @@ -68,7 +68,7 @@ void RobotCMDInit() .spi_handle = &hspi1, .GPIOx = GPIOB, .cs_pin = GPIO_PIN_0, - .spi_work_mode = SPI_IT_MODE, + .spi_work_mode = SPI_DMA_MODE, }, .gyro_int_config = { .GPIO_Pin = GPIO_PIN_5, @@ -90,7 +90,7 @@ void RobotCMDInit() .MaxOut = 100, }, }; - bmi088 = BMI088Register(&bmi088_config); + bmi088_test = BMI088Register(&bmi088_config); rc_data = RemoteControlInit(&huart3); // 修改为对应串口,注意如果是自研板dbus协议串口需选用添加了反相器的那个 vision_recv_data = VisionInit(&huart1); // 视觉通信串口 @@ -319,7 +319,7 @@ static void EmergencyHandler() /* 机器人核心控制任务,200Hz频率运行(必须高于视觉发送频率) */ void RobotCMDTask() { - BMI088Acquire(bmi088,&bmi088_data) ; + BMI088Acquire(bmi088_test,&bmi088_data) ; // 从其他应用获取回传数据 #ifdef ONE_BOARD SubGetMessage(chassis_feed_sub, (void *)&chassis_fetch_data); diff --git a/application/robot_task.h b/application/robot_task.h index 252e77b..557ac90 100644 --- a/application/robot_task.h +++ b/application/robot_task.h @@ -17,13 +17,13 @@ #include "bsp_log.h" -osThreadId insTaskHandle; +// osThreadId insTaskHandle; osThreadId robotTaskHandle; osThreadId motorTaskHandle; osThreadId daemonTaskHandle; osThreadId uiTaskHandle; -void StartINSTASK(void const *argument); +// void StartINSTASK(void const *argument); void StartMOTORTASK(void const *argument); void StartDAEMONTASK(void const *argument); void StartROBOTTASK(void const *argument); @@ -35,9 +35,9 @@ void StartUITASK(void const *argument); */ void OSTaskInit() { - osThreadDef(instask, StartINSTASK, osPriorityAboveNormal, 0, 1024); - insTaskHandle = osThreadCreate(osThread(instask), NULL); // 由于是阻塞读取传感器,为姿态解算设置较高优先级,确保以1khz的频率执行 - // 后续修改为读取传感器数据准备好的中断处理, + // osThreadDef(instask, StartINSTASK, osPriorityAboveNormal, 0, 1024); + // insTaskHandle = osThreadCreate(osThread(instask), NULL); // 由于是阻塞读取传感器,为姿态解算设置较高优先级,确保以1khz的频率执行 + // // 后续修改为读取传感器数据准备好的中断处理, osThreadDef(motortask, StartMOTORTASK, osPriorityNormal, 0, 256); motorTaskHandle = osThreadCreate(osThread(motortask), NULL); @@ -54,24 +54,24 @@ void OSTaskInit() HTMotorControlInit(); // 没有注册HT电机则不会执行 } -__attribute__((noreturn)) void StartINSTASK(void const *argument) -{ - static float ins_start; - static float ins_dt; - INS_Init(); // 确保BMI088被正确初始化. - LOGINFO("[freeRTOS] INS Task Start"); - for (;;) - { - // 1kHz - ins_start = DWT_GetTimeline_ms(); - INS_Task(); - ins_dt = DWT_GetTimeline_ms() - ins_start; - if (ins_dt > 1) - LOGERROR("[freeRTOS] INS Task is being DELAY! dt = [%f]", &ins_dt); - VisionSend(); // 解算完成后发送视觉数据,但是当前的实现不太优雅,后续若添加硬件触发需要重新考虑结构的组织 - osDelay(1); - } -} +// __attribute__((noreturn)) void StartINSTASK(void const *argument) +// { +// static float ins_start; +// static float ins_dt; +// INS_Init(); // 确保BMI088被正确初始化. +// LOGINFO("[freeRTOS] INS Task Start"); +// for (;;) +// { +// // 1kHz +// ins_start = DWT_GetTimeline_ms(); +// //INS_Task(); +// ins_dt = DWT_GetTimeline_ms() - ins_start; +// if (ins_dt > 1) +// LOGERROR("[freeRTOS] INS Task is being DELAY! dt = [%f]", &ins_dt); +// VisionSend(); // 解算完成后发送视觉数据,但是当前的实现不太优雅,后续若添加硬件触发需要重新考虑结构的组织 +// osDelay(1); +// } +// } __attribute__((noreturn)) void StartMOTORTASK(void const *argument) { diff --git a/basic_framework.ioc b/basic_framework.ioc index 3cb82bd..4b2ead1 100644 --- a/basic_framework.ioc +++ b/basic_framework.ioc @@ -25,49 +25,36 @@ CAN2.IPParameters=CalculateTimeQuantum,BS1,BS2,Prescaler,CalculateBaudRate,TXFP, CAN2.NART=ENABLE CAN2.Prescaler=3 CAN2.TXFP=ENABLE -Dma.ADC1.8.Direction=DMA_PERIPH_TO_MEMORY -Dma.ADC1.8.FIFOMode=DMA_FIFOMODE_DISABLE -Dma.ADC1.8.Instance=DMA2_Stream4 -Dma.ADC1.8.MemDataAlignment=DMA_MDATAALIGN_HALFWORD -Dma.ADC1.8.MemInc=DMA_MINC_ENABLE -Dma.ADC1.8.Mode=DMA_NORMAL -Dma.ADC1.8.PeriphDataAlignment=DMA_PDATAALIGN_HALFWORD -Dma.ADC1.8.PeriphInc=DMA_PINC_DISABLE -Dma.ADC1.8.Priority=DMA_PRIORITY_LOW -Dma.ADC1.8.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode -Dma.I2C2_RX.9.Direction=DMA_PERIPH_TO_MEMORY -Dma.I2C2_RX.9.FIFOMode=DMA_FIFOMODE_DISABLE -Dma.I2C2_RX.9.Instance=DMA1_Stream2 -Dma.I2C2_RX.9.MemDataAlignment=DMA_MDATAALIGN_BYTE -Dma.I2C2_RX.9.MemInc=DMA_MINC_ENABLE -Dma.I2C2_RX.9.Mode=DMA_NORMAL -Dma.I2C2_RX.9.PeriphDataAlignment=DMA_PDATAALIGN_BYTE -Dma.I2C2_RX.9.PeriphInc=DMA_PINC_DISABLE -Dma.I2C2_RX.9.Priority=DMA_PRIORITY_LOW -Dma.I2C2_RX.9.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode -Dma.I2C2_TX.10.Direction=DMA_MEMORY_TO_PERIPH -Dma.I2C2_TX.10.FIFOMode=DMA_FIFOMODE_DISABLE -Dma.I2C2_TX.10.Instance=DMA1_Stream7 -Dma.I2C2_TX.10.MemDataAlignment=DMA_MDATAALIGN_BYTE -Dma.I2C2_TX.10.MemInc=DMA_MINC_ENABLE -Dma.I2C2_TX.10.Mode=DMA_NORMAL -Dma.I2C2_TX.10.PeriphDataAlignment=DMA_PDATAALIGN_BYTE -Dma.I2C2_TX.10.PeriphInc=DMA_PINC_DISABLE -Dma.I2C2_TX.10.Priority=DMA_PRIORITY_LOW -Dma.I2C2_TX.10.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode +Dma.I2C2_RX.6.Direction=DMA_PERIPH_TO_MEMORY +Dma.I2C2_RX.6.FIFOMode=DMA_FIFOMODE_DISABLE +Dma.I2C2_RX.6.Instance=DMA1_Stream2 +Dma.I2C2_RX.6.MemDataAlignment=DMA_MDATAALIGN_BYTE +Dma.I2C2_RX.6.MemInc=DMA_MINC_ENABLE +Dma.I2C2_RX.6.Mode=DMA_NORMAL +Dma.I2C2_RX.6.PeriphDataAlignment=DMA_PDATAALIGN_BYTE +Dma.I2C2_RX.6.PeriphInc=DMA_PINC_DISABLE +Dma.I2C2_RX.6.Priority=DMA_PRIORITY_LOW +Dma.I2C2_RX.6.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode +Dma.I2C2_TX.7.Direction=DMA_MEMORY_TO_PERIPH +Dma.I2C2_TX.7.FIFOMode=DMA_FIFOMODE_DISABLE +Dma.I2C2_TX.7.Instance=DMA1_Stream7 +Dma.I2C2_TX.7.MemDataAlignment=DMA_MDATAALIGN_BYTE +Dma.I2C2_TX.7.MemInc=DMA_MINC_ENABLE +Dma.I2C2_TX.7.Mode=DMA_NORMAL +Dma.I2C2_TX.7.PeriphDataAlignment=DMA_PDATAALIGN_BYTE +Dma.I2C2_TX.7.PeriphInc=DMA_PINC_DISABLE +Dma.I2C2_TX.7.Priority=DMA_PRIORITY_LOW +Dma.I2C2_TX.7.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode Dma.Request0=USART6_RX Dma.Request1=USART6_TX -Dma.Request10=I2C2_TX -Dma.Request11=SPI1_TX Dma.Request2=USART1_TX Dma.Request3=USART1_RX Dma.Request4=SPI1_RX -Dma.Request5=SPI2_RX -Dma.Request6=SPI2_TX -Dma.Request7=USART3_RX -Dma.Request8=ADC1 -Dma.Request9=I2C2_RX -Dma.RequestsNb=12 +Dma.Request5=USART3_RX +Dma.Request6=I2C2_RX +Dma.Request7=I2C2_TX +Dma.Request8=SPI1_TX +Dma.RequestsNb=9 Dma.SPI1_RX.4.Direction=DMA_PERIPH_TO_MEMORY Dma.SPI1_RX.4.FIFOMode=DMA_FIFOMODE_ENABLE Dma.SPI1_RX.4.FIFOThreshold=DMA_FIFO_THRESHOLD_FULL @@ -79,44 +66,18 @@ Dma.SPI1_RX.4.Mode=DMA_NORMAL Dma.SPI1_RX.4.PeriphBurst=DMA_PBURST_SINGLE Dma.SPI1_RX.4.PeriphDataAlignment=DMA_PDATAALIGN_BYTE Dma.SPI1_RX.4.PeriphInc=DMA_PINC_DISABLE -Dma.SPI1_RX.4.Priority=DMA_PRIORITY_LOW +Dma.SPI1_RX.4.Priority=DMA_PRIORITY_HIGH Dma.SPI1_RX.4.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode,FIFOThreshold,MemBurst,PeriphBurst -Dma.SPI1_TX.11.Direction=DMA_MEMORY_TO_PERIPH -Dma.SPI1_TX.11.FIFOMode=DMA_FIFOMODE_DISABLE -Dma.SPI1_TX.11.Instance=DMA2_Stream3 -Dma.SPI1_TX.11.MemDataAlignment=DMA_MDATAALIGN_BYTE -Dma.SPI1_TX.11.MemInc=DMA_MINC_ENABLE -Dma.SPI1_TX.11.Mode=DMA_NORMAL -Dma.SPI1_TX.11.PeriphDataAlignment=DMA_PDATAALIGN_BYTE -Dma.SPI1_TX.11.PeriphInc=DMA_PINC_DISABLE -Dma.SPI1_TX.11.Priority=DMA_PRIORITY_LOW -Dma.SPI1_TX.11.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode -Dma.SPI2_RX.5.Direction=DMA_PERIPH_TO_MEMORY -Dma.SPI2_RX.5.FIFOMode=DMA_FIFOMODE_ENABLE -Dma.SPI2_RX.5.FIFOThreshold=DMA_FIFO_THRESHOLD_FULL -Dma.SPI2_RX.5.Instance=DMA1_Stream3 -Dma.SPI2_RX.5.MemBurst=DMA_MBURST_SINGLE -Dma.SPI2_RX.5.MemDataAlignment=DMA_MDATAALIGN_BYTE -Dma.SPI2_RX.5.MemInc=DMA_MINC_ENABLE -Dma.SPI2_RX.5.Mode=DMA_NORMAL -Dma.SPI2_RX.5.PeriphBurst=DMA_PBURST_SINGLE -Dma.SPI2_RX.5.PeriphDataAlignment=DMA_PDATAALIGN_BYTE -Dma.SPI2_RX.5.PeriphInc=DMA_PINC_DISABLE -Dma.SPI2_RX.5.Priority=DMA_PRIORITY_LOW -Dma.SPI2_RX.5.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode,FIFOThreshold,MemBurst,PeriphBurst -Dma.SPI2_TX.6.Direction=DMA_MEMORY_TO_PERIPH -Dma.SPI2_TX.6.FIFOMode=DMA_FIFOMODE_ENABLE -Dma.SPI2_TX.6.FIFOThreshold=DMA_FIFO_THRESHOLD_FULL -Dma.SPI2_TX.6.Instance=DMA1_Stream4 -Dma.SPI2_TX.6.MemBurst=DMA_MBURST_SINGLE -Dma.SPI2_TX.6.MemDataAlignment=DMA_MDATAALIGN_BYTE -Dma.SPI2_TX.6.MemInc=DMA_MINC_ENABLE -Dma.SPI2_TX.6.Mode=DMA_NORMAL -Dma.SPI2_TX.6.PeriphBurst=DMA_PBURST_SINGLE -Dma.SPI2_TX.6.PeriphDataAlignment=DMA_PDATAALIGN_BYTE -Dma.SPI2_TX.6.PeriphInc=DMA_PINC_DISABLE -Dma.SPI2_TX.6.Priority=DMA_PRIORITY_LOW -Dma.SPI2_TX.6.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode,FIFOThreshold,MemBurst,PeriphBurst +Dma.SPI1_TX.8.Direction=DMA_MEMORY_TO_PERIPH +Dma.SPI1_TX.8.FIFOMode=DMA_FIFOMODE_DISABLE +Dma.SPI1_TX.8.Instance=DMA2_Stream3 +Dma.SPI1_TX.8.MemDataAlignment=DMA_MDATAALIGN_BYTE +Dma.SPI1_TX.8.MemInc=DMA_MINC_ENABLE +Dma.SPI1_TX.8.Mode=DMA_NORMAL +Dma.SPI1_TX.8.PeriphDataAlignment=DMA_PDATAALIGN_BYTE +Dma.SPI1_TX.8.PeriphInc=DMA_PINC_DISABLE +Dma.SPI1_TX.8.Priority=DMA_PRIORITY_HIGH +Dma.SPI1_TX.8.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode Dma.USART1_RX.3.Direction=DMA_PERIPH_TO_MEMORY Dma.USART1_RX.3.FIFOMode=DMA_FIFOMODE_DISABLE Dma.USART1_RX.3.Instance=DMA2_Stream5 @@ -137,16 +98,16 @@ Dma.USART1_TX.2.PeriphDataAlignment=DMA_PDATAALIGN_BYTE Dma.USART1_TX.2.PeriphInc=DMA_PINC_DISABLE Dma.USART1_TX.2.Priority=DMA_PRIORITY_VERY_HIGH Dma.USART1_TX.2.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode -Dma.USART3_RX.7.Direction=DMA_PERIPH_TO_MEMORY -Dma.USART3_RX.7.FIFOMode=DMA_FIFOMODE_DISABLE -Dma.USART3_RX.7.Instance=DMA1_Stream1 -Dma.USART3_RX.7.MemDataAlignment=DMA_MDATAALIGN_BYTE -Dma.USART3_RX.7.MemInc=DMA_MINC_ENABLE -Dma.USART3_RX.7.Mode=DMA_NORMAL -Dma.USART3_RX.7.PeriphDataAlignment=DMA_PDATAALIGN_BYTE -Dma.USART3_RX.7.PeriphInc=DMA_PINC_DISABLE -Dma.USART3_RX.7.Priority=DMA_PRIORITY_LOW -Dma.USART3_RX.7.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode +Dma.USART3_RX.5.Direction=DMA_PERIPH_TO_MEMORY +Dma.USART3_RX.5.FIFOMode=DMA_FIFOMODE_DISABLE +Dma.USART3_RX.5.Instance=DMA1_Stream1 +Dma.USART3_RX.5.MemDataAlignment=DMA_MDATAALIGN_BYTE +Dma.USART3_RX.5.MemInc=DMA_MINC_ENABLE +Dma.USART3_RX.5.Mode=DMA_NORMAL +Dma.USART3_RX.5.PeriphDataAlignment=DMA_PDATAALIGN_BYTE +Dma.USART3_RX.5.PeriphInc=DMA_PINC_DISABLE +Dma.USART3_RX.5.Priority=DMA_PRIORITY_LOW +Dma.USART3_RX.5.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode Dma.USART6_RX.0.Direction=DMA_PERIPH_TO_MEMORY Dma.USART6_RX.0.FIFOMode=DMA_FIFOMODE_ENABLE Dma.USART6_RX.0.FIFOThreshold=DMA_FIFO_THRESHOLD_FULL @@ -295,14 +256,11 @@ NVIC.CAN2_RX0_IRQn=true\:5\:0\:true\:false\:true\:true\:true\:true\:true NVIC.CAN2_RX1_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true NVIC.DMA1_Stream1_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true NVIC.DMA1_Stream2_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true -NVIC.DMA1_Stream3_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true -NVIC.DMA1_Stream4_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true NVIC.DMA1_Stream7_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true -NVIC.DMA2_Stream0_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true +NVIC.DMA2_Stream0_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true\:true NVIC.DMA2_Stream2_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true -NVIC.DMA2_Stream3_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true -NVIC.DMA2_Stream4_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true -NVIC.DMA2_Stream5_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true +NVIC.DMA2_Stream3_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true\:true +NVIC.DMA2_Stream5_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true\:true NVIC.DMA2_Stream6_IRQn=true\:5\:0\:true\:false\:true\:true\:false\:true\:true NVIC.DMA2_Stream7_IRQn=true\:5\:0\:true\:false\:true\:true\:false\:true\:true NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false @@ -518,6 +476,7 @@ ProjectManager.PreviousToolchain= ProjectManager.ProjectBuild=false ProjectManager.ProjectFileName=basic_framework.ioc ProjectManager.ProjectName=basic_framework +ProjectManager.ProjectStructure= ProjectManager.RegisterCallBack= ProjectManager.StackSize=0x5000 ProjectManager.TargetToolchain=Makefile @@ -689,3 +648,4 @@ VP_TIM8_VS_ClockSourceINT.Signal=TIM8_VS_ClockSourceINT VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Mode=CDC_FS VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Signal=USB_DEVICE_VS_USB_DEVICE_CDC_FS board=custom +rtos.0.ip=FREERTOS diff --git a/modules/BMI088/bmi088.c b/modules/BMI088/bmi088.c index 04ffbdc..4729b29 100644 --- a/modules/BMI088/bmi088.c +++ b/modules/BMI088/bmi088.c @@ -1,7 +1,9 @@ #include "bmi088_regNdef.h" #include "bmi088.h" #include "user_lib.h" +#include "daemon.h" +static DaemonInstance *bmi088_daemon_instance; // ---------------------------以下私有函数,用于读写BMI088寄存器封装,blocking--------------------------------// /** * @brief 读取BMI088寄存器Accel. BMI088要求在不释放CS的情况下连续读取 @@ -41,7 +43,11 @@ static void BMI088GyroRead(BMI088Instance *bmi088, uint8_t reg, uint8_t *dataptr static uint8_t tx[7] = {0x80}; // 读取,第一个字节为0x80 | reg ,之后是dummy data static uint8_t rx[7]; // 第一个是dummy data,第三个开始是真正的数据 tx[0] = 0x80 | reg; - SPITransRecv(bmi088->spi_gyro, rx, tx, len + 1); + //SPITransRecv(bmi088->spi_gyro, rx, tx, len + 1); + do + { + SPITransRecv(bmi088->spi_gyro, rx, tx, len + 1); + }while (rx[1] == 0 && rx[2] == 128 && rx[6] == 129); //@todo我也不知道哪来的错误帧 先这样吧。。。。。 memcpy(dataptr, rx + 1, len); // @todo : memcpy有额外开销,后续可以考虑优化,在SPI中加入接口或模式,使得在一次传输结束后不释放CS,直接接着传输 } @@ -190,6 +196,7 @@ static void BMI088AccSPIFinishCallback(SPIInstance *spi) { // static BMI088Instance *bmi088; // bmi088 = (BMI088Instance *)(spi->id); + // 若第一次读取加速度,则在这里启动温度读取 // 如果使用异步姿态更新,此处唤醒量测更新的任务 } @@ -203,16 +210,32 @@ static void BMI088GyroSPIFinishCallback(SPIInstance *spi) static void BMI088AccINTCallback(GPIOInstance *gpio) { - // static BMI088Instance *bmi088; - // bmi088 = (BMI088Instance *)(gpio->id); + static BMI088Instance *bmi088; + static uint8_t buf[6] = {0}; // 最多读取6个byte(gyro/acc,temp是2) + bmi088 = (BMI088Instance *)(gpio->id); + bmi088->update_flag.imu_ready = 1; + bmi088->update_flag.acc = 1; + BMI088AccelRead(bmi088, BMI088_ACCEL_XOUT_L, buf, 6); + for (uint8_t i = 0; i < 3; i++) + bmi088->acc[i] = bmi088->acc_coef * (float)(int16_t)(((buf[2 * i + 1]) << 8) | buf[2 * i]); // 启动加速度计数据读取(和温度读取,如果有必要),并转换为实际值 // 读取完毕会调用BMI088AccSPIFinishCallback } static void BMI088GyroINTCallback(GPIOInstance *gpio) { - // static BMI088Instance *bmi088; - // bmi088 = (BMI088Instance *)(gpio->id); + static BMI088Instance *bmi088; + static uint8_t buf[6] = {0}; // 最多读取6个byte(gyro/acc,temp是2) + bmi088 = (BMI088Instance *)(gpio->id); + bmi088->update_flag.imu_ready = 1; + bmi088->update_flag.gyro = 1; + BMI088GyroRead(bmi088, BMI088_GYRO_X_L, buf, 6); + for (uint8_t i = 0; i < 3; i++) + bmi088->gyro[i] = bmi088->BMI088_GYRO_SEN * (float)(int16_t)(((buf[2 * i + 1]) << 8) | buf[2 * i]); + if(bmi088->gyro[0] < -20) + { + bmi088->update_flag.temp = 1; + } // 启动陀螺仪数据读取,并转换为实际值 // 读取完毕会调用BMI088GyroSPIFinishCallback } @@ -250,7 +273,16 @@ uint8_t BMI088Acquire(BMI088Instance *bmi088, BMI088_Data_t *data_store) // 如果是IT模式,则检查标志位.当传感器数据准备好会触发外部中断,中断服务函数会将标志位置1 if (bmi088->work_mode == BMI088_BLOCK_TRIGGER_MODE && bmi088->update_flag.imu_ready == 1) { - memcpy(data_store, &bmi088->gyro, sizeof(BMI088_Data_t)); + if(bmi088->update_flag.acc == 1) + { + memcpy(data_store->acc,bmi088->acc,3*sizeof(float)); + bmi088->update_flag.acc = 0; + } + if(bmi088->update_flag.gyro == 1) + { + memcpy(data_store->gyro,bmi088->gyro,3*sizeof(float)); + bmi088->update_flag.gyro = 0; + } bmi088->update_flag.imu_ready = 0; return 1; } @@ -313,8 +345,8 @@ void BMI088CalibrateIMU(BMI088Instance *_bmi088) BMI088Acquire(_bmi088, &raw_data); gNormTemp = NormOf3d(raw_data.acc); _bmi088->gNorm += gNormTemp; // 计算范数并累加,最后除以calib times获取单次值 - for (uint8_t i = 0; i < 3; i++) - _bmi088->gyro_offset[i] += raw_data.gyro[i]; // 因为标定时传感器静止,所以采集到的值就是漂移,累加当前值,最后除以calib times获得零飘 + for (uint8_t ii = 0; ii < 3; ii++) + _bmi088->gyro_offset[ii] += raw_data.gyro[ii]; // 因为标定时传感器静止,所以采集到的值就是漂移,累加当前值,最后除以calib times获得零飘 if (i == 0) // 避免未定义的行为(else中) { @@ -403,26 +435,9 @@ BMI088Instance *BMI088Register(BMI088_Init_Config_s *config) // SPI_ACC DMA CALLBACK: 解算加速度计数据,清除温度wait标志位并启动温度传输,第二次进入中断时解算温度数据 // 还有其他方案可用,比如阻塞等待传输完成,但是比较笨. - - // 根据参数选择工作模式 - if (config->work_mode == BMI088_BLOCK_PERIODIC_MODE) - { config->spi_acc_config.spi_work_mode = SPI_BLOCK_MODE; config->spi_gyro_config.spi_work_mode = SPI_BLOCK_MODE; - // callbacks are all NULL - } - else if (config->work_mode == BMI088_BLOCK_TRIGGER_MODE) - { - config->spi_gyro_config.spi_work_mode = SPI_DMA_MODE; // 如果DMA资源不够,可以用SPI_IT_MODE - config->spi_gyro_config.spi_work_mode = SPI_DMA_MODE; - // 设置回调函数 - config->spi_acc_config.callback = BMI088AccSPIFinishCallback; - config->spi_gyro_config.callback = BMI088GyroSPIFinishCallback; - config->acc_int_config.gpio_model_callback = BMI088AccINTCallback; - config->gyro_int_config.gpio_model_callback = BMI088GyroINTCallback; - bmi088_instance->acc_int = GPIORegister(&config->acc_int_config); // 只有在非阻塞模式下才需要注册中断 - bmi088_instance->gyro_int = GPIORegister(&config->gyro_int_config); - } // 注册实例 + // 根据参数选择工作模式 bmi088_instance->spi_acc = SPIRegister(&config->spi_acc_config); bmi088_instance->spi_gyro = SPIRegister(&config->spi_gyro_config); bmi088_instance->heat_pwm = PWMRegister(&config->heat_pwm_config); @@ -441,6 +456,20 @@ BMI088Instance *BMI088Register(BMI088_Init_Config_s *config) bmi088_instance->work_mode = BMI088_BLOCK_PERIODIC_MODE; // 临时设置为阻塞模式 BMI088CalibrateIMU(bmi088_instance); // 标定acc和gyro bmi088_instance->work_mode = config->work_mode; // 恢复工作模式 + if (config->work_mode == BMI088_BLOCK_TRIGGER_MODE) + { + bmi088_instance->spi_acc->spi_work_mode = SPI_DMA_MODE; + bmi088_instance->spi_gyro->spi_work_mode = SPI_DMA_MODE; + + // 设置回调函数 + bmi088_instance->spi_acc->callback = BMI088AccSPIFinishCallback; + bmi088_instance->spi_gyro->callback = BMI088GyroSPIFinishCallback; + + bmi088_instance->acc_int = GPIORegister(&config->acc_int_config); // 只有在非阻塞模式下才需要注册中断 + bmi088_instance->gyro_int = GPIORegister(&config->gyro_int_config); + bmi088_instance->acc_int->gpio_model_callback = BMI088AccINTCallback; + bmi088_instance->gyro_int->gpio_model_callback = BMI088GyroINTCallback; + } // 注册实例 return bmi088_instance; }