超电
This commit is contained in:
parent
e423d51d4f
commit
bae163b541
@ -103,11 +103,11 @@ void MX_USART3_UART_Init(void)
|
||||
|
||||
/* USER CODE END USART3_Init 1 */
|
||||
huart3.Instance = USART3;
|
||||
huart3.Init.BaudRate = 100000;
|
||||
huart3.Init.WordLength = UART_WORDLENGTH_9B;
|
||||
huart3.Init.BaudRate = 921600;
|
||||
huart3.Init.WordLength = UART_WORDLENGTH_8B;
|
||||
huart3.Init.StopBits = UART_STOPBITS_1;
|
||||
huart3.Init.Parity = UART_PARITY_EVEN;
|
||||
huart3.Init.Mode = UART_MODE_TX_RX;
|
||||
huart3.Init.Parity = UART_PARITY_NONE;
|
||||
huart3.Init.Mode = UART_MODE_RX;
|
||||
huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE;
|
||||
huart3.Init.OverSampling = UART_OVERSAMPLING_16;
|
||||
if (HAL_UART_Init(&huart3) != HAL_OK)
|
||||
|
||||
111776
MDK-ARM/JLinkLog.txt
111776
MDK-ARM/JLinkLog.txt
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -117,6 +117,11 @@
|
||||
<pMon>Segger\JL2CM3.dll</pMon>
|
||||
</DebugOpt>
|
||||
<TargetDriverDllRegistry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGUARM</Key>
|
||||
<Name></Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>ARMRTXEVENTFLAGS</Key>
|
||||
@ -180,6 +185,11 @@
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>cmd_id</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>6</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>vt13</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
@ -1106,6 +1116,18 @@
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\device\vt13.c</PathWithFileName>
|
||||
<FilenameWithoutPath>vt13.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>69</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\device\ET16s.c</PathWithFileName>
|
||||
<FilenameWithoutPath>ET16s.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -1113,7 +1135,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>69</FileNumber>
|
||||
<FileNumber>70</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1125,7 +1147,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>70</FileNumber>
|
||||
<FileNumber>71</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1137,7 +1159,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>71</FileNumber>
|
||||
<FileNumber>72</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1149,7 +1171,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>72</FileNumber>
|
||||
<FileNumber>73</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1161,7 +1183,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>73</FileNumber>
|
||||
<FileNumber>74</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1173,7 +1195,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>74</FileNumber>
|
||||
<FileNumber>75</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1185,7 +1207,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>75</FileNumber>
|
||||
<FileNumber>76</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1197,7 +1219,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>76</FileNumber>
|
||||
<FileNumber>77</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
@ -1207,23 +1229,11 @@
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>77</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\device\vt13.c</PathWithFileName>
|
||||
<FilenameWithoutPath>vt13.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>module</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -1335,7 +1345,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>task</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@ -1495,6 +1505,18 @@
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>11</GroupNumber>
|
||||
<FileNumber>99</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\User\task\vt13.c</PathWithFileName>
|
||||
<FilenameWithoutPath>vt13.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
|
||||
@ -907,6 +907,11 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\device\dr16.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>vt13.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\device\vt13.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>ET16s.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@ -952,11 +957,6 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\device\referee.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>vt13.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\device\vt13.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
@ -1077,6 +1077,11 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\task\super_cap.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>vt13.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\User\task\vt13.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
||||
Binary file not shown.
@ -67,4 +67,4 @@ referee/chassis.o: ..\User\module\chassis.c ..\User\module\chassis.h \
|
||||
..\User\module\gimbal.h ..\User\device\motor_dm.h \
|
||||
..\User\module\shoot.h ..\User\module\config.h ..\User\module\gimbal.h \
|
||||
..\User\module\shoot.h ..\User\module\cmd\cmd.h \
|
||||
..\User\device\supercap.h ..\User\bsp\can.h
|
||||
..\User\device\supercap.h ..\User\bsp\can.h ..\User\device\supercap.h
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -10,4 +10,9 @@ referee/dr16_1.o: ..\User\task\dr16.c ..\User\task\user_task.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F\portmacro.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\include\task.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\include\list.h
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\include\list.h \
|
||||
..\User\device\dr16.h ..\User\component\user_math.h \
|
||||
D:\Keil_v5\ARM\ARMCLANG\Bin\..\include\float.h \
|
||||
D:\Keil_v5\ARM\ARMCLANG\Bin\..\include\math.h \
|
||||
D:\Keil_v5\ARM\ARMCLANG\Bin\..\include\stdbool.h \
|
||||
..\User\device\device.h
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -22,11 +22,11 @@ Dialog DLL: TCM.DLL V1.48.0.0
|
||||
|
||||
<h2>Project:</h2>
|
||||
D:\yunha\git\RM\referee\MDK-ARM\referee.uvprojx
|
||||
Project File Date: 03/10/2026
|
||||
Project File Date: 03/11/2026
|
||||
|
||||
<h2>Output:</h2>
|
||||
*** Using Compiler 'V6.16', folder: 'D:\Keil_v5\ARM\ARMCLANG\Bin'
|
||||
Rebuild target 'referee'
|
||||
Build target 'referee'
|
||||
Note: source file '..\User\bsp\can.c' - object file renamed from 'referee\can.o' to 'referee\can_1.o'.
|
||||
Note: source file '..\User\bsp\gpio.c' - object file renamed from 'referee\gpio.o' to 'referee\gpio_1.o'.
|
||||
Note: source file '..\User\bsp\spi.c' - object file renamed from 'referee\spi.o' to 'referee\spi_1.o'.
|
||||
@ -36,139 +36,19 @@ Note: source file '..\User\task\dr16.c' - object file renamed from 'referee\dr16
|
||||
Note: source file '..\User\task\et16s.c' - object file renamed from 'referee\et16s.o' to 'referee\et16s_1.o'.
|
||||
Note: source file '..\User\task\referee.c' - object file renamed from 'referee\referee.o' to 'referee\referee_1.o'.
|
||||
Note: source file '..\User\task\vofa.c' - object file renamed from 'referee\vofa.o' to 'referee\vofa_1.o'.
|
||||
compiling main.c...
|
||||
assembling startup_stm32f407xx.s...
|
||||
compiling freertos.c...
|
||||
compiling tim.c...
|
||||
compiling dma.c...
|
||||
compiling stm32f4xx_hal_can.c...
|
||||
compiling gpio.c...
|
||||
compiling stm32f4xx_it.c...
|
||||
compiling stm32f4xx_hal_msp.c...
|
||||
compiling i2c.c...
|
||||
compiling spi.c...
|
||||
compiling can.c...
|
||||
compiling usart.c...
|
||||
compiling stm32f4xx_hal_rcc_ex.c...
|
||||
compiling stm32f4xx_hal_flash.c...
|
||||
compiling stm32f4xx_hal_rcc.c...
|
||||
compiling stm32f4xx_hal_flash_ramfunc.c...
|
||||
compiling stm32f4xx_hal_flash_ex.c...
|
||||
compiling stm32f4xx_hal_gpio.c...
|
||||
compiling stm32f4xx_hal_dma_ex.c...
|
||||
compiling stm32f4xx_hal_pwr.c...
|
||||
compiling stm32f4xx_hal_dma.c...
|
||||
compiling stm32f4xx_hal_pwr_ex.c...
|
||||
compiling stm32f4xx_hal_cortex.c...
|
||||
compiling stm32f4xx_hal.c...
|
||||
compiling stm32f4xx_hal_i2c_ex.c...
|
||||
compiling list.c...
|
||||
compiling croutine.c...
|
||||
compiling event_groups.c...
|
||||
compiling system_stm32f4xx.c...
|
||||
compiling stm32f4xx_hal_exti.c...
|
||||
compiling stm32f4xx_hal_tim_ex.c...
|
||||
compiling queue.c...
|
||||
compiling stm32f4xx_hal_uart.c...
|
||||
compiling stm32f4xx_hal_spi.c...
|
||||
compiling timers.c...
|
||||
compiling stream_buffer.c...
|
||||
compiling tasks.c...
|
||||
compiling stm32f4xx_hal_tim.c...
|
||||
compiling stm32f4xx_hal_i2c.c...
|
||||
compiling heap_4.c...
|
||||
compiling cmsis_os2.c...
|
||||
compiling port.c...
|
||||
compiling mm.c...
|
||||
compiling gpio.c...
|
||||
compiling dwt.c...
|
||||
compiling pwm.c...
|
||||
compiling spi.c...
|
||||
compiling can.c...
|
||||
compiling time.c...
|
||||
compiling ahrs.c...
|
||||
compiling i2c.c...
|
||||
compiling calc_lib.c...
|
||||
compiling capacity.c...
|
||||
compiling uart.c...
|
||||
compiling crc8.c...
|
||||
compiling crc16.c...
|
||||
compiling error_detect.c...
|
||||
compiling filter.c...
|
||||
compiling freertos_cli.c...
|
||||
compiling limiter.c...
|
||||
compiling mixer.c...
|
||||
compiling pid.c...
|
||||
compiling user_math.c...
|
||||
compiling ui.c...
|
||||
compiling dr16.c...
|
||||
compiling bmi088.c...
|
||||
compiling ist8310.c...
|
||||
compiling motor.c...
|
||||
compiling motor_rm.c...
|
||||
compiling motor_dm.c...
|
||||
compiling ET16s.c...
|
||||
compiling led.c...
|
||||
compiling vofa.c...
|
||||
compiling supercap.c...
|
||||
compiling vt13.c...
|
||||
compiling config.c...
|
||||
../User/module/chassis.c(219): warning: enumeration value 'CHASSIS_MODE_FOLLOW_GIMBAL_35' not handled in switch [-Wswitch]
|
||||
switch (c->mode)
|
||||
^
|
||||
1 warning generated.
|
||||
compiling chassis.c...
|
||||
compiling referee.c...
|
||||
../User/module/gimbal.c(303): warning: non-void function does not return a value in all control paths [-Wreturn-type]
|
||||
}
|
||||
^
|
||||
1 warning generated.
|
||||
compiling gimbal.c...
|
||||
compiling cmd_adapter.c...
|
||||
compiling shoot.c...
|
||||
../User/module/cmd/cmd.c(118): warning: implicit conversion from enumeration type 'CHASSIS_ATTITUDE_MODE_t' to different enumeration type 'Chassis_Mode_t' [-Wenum-conversion]
|
||||
ctx->output.chassis.cmd.mode = STOP_MODE;
|
||||
~ ^~~~~~~~~
|
||||
1 warning generated.
|
||||
compiling cmd.c...
|
||||
compiling ai.c...
|
||||
compiling cmd_example.c...
|
||||
compiling dr16.c...
|
||||
compiling et16s.c...
|
||||
compiling cmd.c...
|
||||
compiling atti_esti.c...
|
||||
../User/task/chassis_ctrl.c(44): warning: if statement has empty body [-Wempty-body]
|
||||
Note: source file '..\User\task\vt13.c' - object file renamed from 'referee\vt13.o' to 'referee\vt13_1.o'.
|
||||
../User/task/chassis_ctrl.c(48): warning: if statement has empty body [-Wempty-body]
|
||||
if(osMessageQueueGet(task_runtime.msgq.chassis.cmd, &cmd_chassis, NULL, 0)==osOK);
|
||||
^
|
||||
../User/task/chassis_ctrl.c(44): note: put the semicolon on a separate line to silence this warning
|
||||
../User/task/chassis_ctrl.c(50): warning: implicit declaration of function 'Chassis_DumpUI' is invalid in C99 [-Wimplicit-function-declaration]
|
||||
../User/task/chassis_ctrl.c(48): note: put the semicolon on a separate line to silence this warning
|
||||
../User/task/chassis_ctrl.c(55): warning: implicit declaration of function 'Chassis_DumpUI' is invalid in C99 [-Wimplicit-function-declaration]
|
||||
Chassis_DumpUI(&chassis, &chassis_ui);
|
||||
^
|
||||
2 warnings generated.
|
||||
compiling chassis_ctrl.c...
|
||||
compiling cmd_behavior.c...
|
||||
../User/task/gimbal_ctrl.c(53): warning: implicit declaration of function 'Gimbal_DumpUI' is invalid in C99 [-Wimplicit-function-declaration]
|
||||
Gimbal_DumpUI(&gimbal,&gimbal_ui);
|
||||
^
|
||||
1 warning generated.
|
||||
compiling gimbal_ctrl.c...
|
||||
compiling init.c...
|
||||
compiling user_task.c...
|
||||
compiling vofa.c...
|
||||
compiling referee.c...
|
||||
../User/task/shoot_ctrl.c(53): warning: implicit declaration of function 'Shoot_DumpUI' is invalid in C99 [-Wimplicit-function-declaration]
|
||||
Shoot_DumpUI(&shoot, &shoot_ui);
|
||||
^
|
||||
1 warning generated.
|
||||
compiling shoot_ctrl.c...
|
||||
../User/task/super_cap.c(53): warning: implicit declaration of function 'Cap_DumpUI' is invalid in C99 [-Wimplicit-function-declaration]
|
||||
Cap_DumpUI(&cap_ui);
|
||||
^
|
||||
1 warning generated.
|
||||
compiling super_cap.c...
|
||||
linking...
|
||||
Program Size: Code=73536 RO-data=2660 RW-data=1172 ZI-data=122428
|
||||
"referee\referee.axf" - 0 Error(s), 8 Warning(s).
|
||||
Program Size: Code=74504 RO-data=2700 RW-data=1172 ZI-data=122660
|
||||
"referee\referee.axf" - 0 Error(s), 2 Warning(s).
|
||||
|
||||
<h2>Software Packages used:</h2>
|
||||
|
||||
@ -192,7 +72,7 @@ Package Vendor: Keil
|
||||
|
||||
* Component: ARM::CMSIS:CORE:5.4.0
|
||||
Include file: CMSIS\Core\Include\tz_context.h
|
||||
Build Time Elapsed: 00:00:07
|
||||
Build Time Elapsed: 00:00:03
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -66,6 +66,7 @@
|
||||
"referee\user_math.o"
|
||||
"referee\bmi088.o"
|
||||
"referee\dr16.o"
|
||||
"referee\vt13.o"
|
||||
"referee\et16s.o"
|
||||
"referee\ist8310.o"
|
||||
"referee\led.o"
|
||||
@ -75,7 +76,6 @@
|
||||
"referee\supercap.o"
|
||||
"referee\vofa.o"
|
||||
"referee\referee.o"
|
||||
"referee\vt13.o"
|
||||
"referee\chassis.o"
|
||||
"referee\config.o"
|
||||
"referee\gimbal.o"
|
||||
@ -97,6 +97,7 @@
|
||||
"referee\user_task.o"
|
||||
"referee\vofa_1.o"
|
||||
"referee\super_cap.o"
|
||||
"referee\vt13_1.o"
|
||||
--strict --scatter "referee\referee.sct"
|
||||
--summary_stderr --info summarysizes --map --load_addr_map_info --xref --callgraph --symbols
|
||||
--info sizes --info totals --info unused --info veneers
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
17
MDK-ARM/referee/vt13_1.d
Normal file
17
MDK-ARM/referee/vt13_1.d
Normal file
@ -0,0 +1,17 @@
|
||||
referee/vt13_1.o: ..\User\task\vt13.c ..\User\task\user_task.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS_V2\cmsis_os2.h \
|
||||
D:\Keil_v5\ARM\ARMCLANG\Bin\..\include\stdint.h \
|
||||
D:\Keil_v5\ARM\ARMCLANG\Bin\..\include\stddef.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\include\FreeRTOS.h \
|
||||
..\Core\Inc\FreeRTOSConfig.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\include\projdefs.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\include\portable.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\include\deprecated_definitions.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\portable\RVDS\ARM_CM4F\portmacro.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\include\mpu_wrappers.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\include\task.h \
|
||||
..\Middlewares\Third_Party\FreeRTOS\Source\include\list.h \
|
||||
..\User\device\vt13.h D:\Keil_v5\ARM\ARMCLANG\Bin\..\include\stdbool.h \
|
||||
..\User\component\user_math.h \
|
||||
D:\Keil_v5\ARM\ARMCLANG\Bin\..\include\float.h \
|
||||
D:\Keil_v5\ARM\ARMCLANG\Bin\..\include\math.h ..\User\device\device.h
|
||||
BIN
MDK-ARM/referee/vt13_1.o
Normal file
BIN
MDK-ARM/referee/vt13_1.o
Normal file
Binary file not shown.
@ -84,11 +84,11 @@ time:
|
||||
uart:
|
||||
devices:
|
||||
- instance: USART1
|
||||
name: VT13
|
||||
name: '1'
|
||||
- instance: USART2
|
||||
name: '2'
|
||||
- instance: USART3
|
||||
name: '3'
|
||||
name: VT13
|
||||
- instance: USART6
|
||||
name: REF
|
||||
enabled: true
|
||||
|
||||
@ -24,11 +24,11 @@ static void (*UART_Callback[BSP_UART_NUM][BSP_UART_CB_NUM])(void);
|
||||
/* Private function -------------------------------------------------------- */
|
||||
static BSP_UART_t UART_Get(UART_HandleTypeDef *huart) {
|
||||
if (huart->Instance == USART1)
|
||||
return BSP_UART_VT13;
|
||||
return BSP_UART_1;
|
||||
else if (huart->Instance == USART2)
|
||||
return BSP_UART_2;
|
||||
else if (huart->Instance == USART3)
|
||||
return BSP_UART_3;
|
||||
return BSP_UART_VT13;
|
||||
else if (huart->Instance == USART6)
|
||||
return BSP_UART_REF;
|
||||
else
|
||||
@ -119,11 +119,11 @@ void BSP_UART_IRQHandler(UART_HandleTypeDef *huart) {
|
||||
|
||||
UART_HandleTypeDef *BSP_UART_GetHandle(BSP_UART_t uart) {
|
||||
switch (uart) {
|
||||
case BSP_UART_VT13:
|
||||
case BSP_UART_1:
|
||||
return &huart1;
|
||||
case BSP_UART_2:
|
||||
return &huart2;
|
||||
case BSP_UART_3:
|
||||
case BSP_UART_VT13:
|
||||
return &huart3;
|
||||
case BSP_UART_REF:
|
||||
return &huart6;
|
||||
|
||||
@ -27,9 +27,9 @@ extern "C" {
|
||||
|
||||
/* UART实体枚举,与设备对应 */
|
||||
typedef enum {
|
||||
BSP_UART_VT13,
|
||||
BSP_UART_1,
|
||||
BSP_UART_2,
|
||||
BSP_UART_3,
|
||||
BSP_UART_VT13,
|
||||
BSP_UART_REF,
|
||||
BSP_UART_NUM,
|
||||
BSP_UART_ERR,
|
||||
|
||||
@ -42,8 +42,8 @@ static osThreadId_t thread_alert;
|
||||
uint8_t cbuf[25u];
|
||||
/* Private function -------------------------------------------------------- */
|
||||
int8_t REMOTE_Restart(void) {
|
||||
__HAL_UART_DISABLE(BSP_UART_GetHandle(BSP_UART_3));
|
||||
__HAL_UART_ENABLE(BSP_UART_GetHandle(BSP_UART_3));
|
||||
__HAL_UART_DISABLE(BSP_UART_GetHandle(BSP_UART_VT13));
|
||||
__HAL_UART_ENABLE(BSP_UART_GetHandle(BSP_UART_VT13));
|
||||
return DEVICE_OK;
|
||||
}
|
||||
|
||||
@ -55,14 +55,14 @@ static void REMOTE_RxCpltCallback(void) {
|
||||
int8_t REMOTE_Init(void) {
|
||||
if ((thread_alert = osThreadGetId()) == NULL) return DEVICE_ERR_NULL;
|
||||
|
||||
BSP_UART_RegisterCallback(BSP_UART_3,BSP_UART_RX_CPLT_CB,
|
||||
BSP_UART_RegisterCallback(BSP_UART_VT13,BSP_UART_RX_CPLT_CB,
|
||||
REMOTE_RxCpltCallback);
|
||||
memset(cbuf, 0, sizeof(cbuf));//初始化清空数据包
|
||||
return DEVICE_OK;
|
||||
}
|
||||
|
||||
int8_t REMOTE_StartDmaRecv(void) {
|
||||
if (HAL_UART_Receive_DMA(BSP_UART_GetHandle(BSP_UART_3),
|
||||
if (HAL_UART_Receive_DMA(BSP_UART_GetHandle(BSP_UART_VT13),
|
||||
(uint8_t *)cbuf,
|
||||
sizeof(cbuf)) == HAL_OK)
|
||||
return DEVICE_OK;
|
||||
|
||||
@ -8,7 +8,7 @@ bmi088:
|
||||
enabled: true
|
||||
dr16:
|
||||
bsp_config:
|
||||
BSP_UART_DR16: BSP_UART_3
|
||||
BSP_UART_DR16: BSP_UART_VT13
|
||||
enabled: true
|
||||
ist8310:
|
||||
bsp_config:
|
||||
|
||||
@ -79,7 +79,7 @@ int8_t DR16_Init(DR16_t *dr16) {
|
||||
if (inited) return DEVICE_ERR_INITED;
|
||||
if ((thread_alert = osThreadGetId()) == NULL) return DEVICE_ERR_NULL;
|
||||
|
||||
BSP_UART_RegisterCallback(BSP_UART_3, BSP_UART_RX_CPLT_CB,
|
||||
BSP_UART_RegisterCallback(BSP_UART_VT13, BSP_UART_RX_CPLT_CB,
|
||||
DR16_RxCpltCallback);
|
||||
|
||||
inited = true;
|
||||
@ -87,13 +87,13 @@ int8_t DR16_Init(DR16_t *dr16) {
|
||||
}
|
||||
|
||||
int8_t DR16_Restart(void) {
|
||||
__HAL_UART_DISABLE(BSP_UART_GetHandle(BSP_UART_3));
|
||||
__HAL_UART_ENABLE(BSP_UART_GetHandle(BSP_UART_3));
|
||||
__HAL_UART_DISABLE(BSP_UART_GetHandle(BSP_UART_VT13));
|
||||
__HAL_UART_ENABLE(BSP_UART_GetHandle(BSP_UART_VT13));
|
||||
return DEVICE_OK;
|
||||
}
|
||||
|
||||
int8_t DR16_StartDmaRecv(DR16_t *dr16) {
|
||||
if (HAL_UART_Receive_DMA(BSP_UART_GetHandle(BSP_UART_3),
|
||||
if (HAL_UART_Receive_DMA(BSP_UART_GetHandle(BSP_UART_VT13),
|
||||
(uint8_t *)&(dr16->raw_data),
|
||||
sizeof(dr16->raw_data)) == HAL_OK)
|
||||
return DEVICE_OK;
|
||||
|
||||
@ -6,6 +6,14 @@
|
||||
#include "crc16.h"
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
/* --------------------------------------------------------
|
||||
串口参数 数值
|
||||
波特率 921600
|
||||
数据位 8
|
||||
停止位 1
|
||||
校验位 无
|
||||
流控 无
|
||||
-------------------------------------------------------- */
|
||||
|
||||
/* Private variables -------------------------------------------------------- */
|
||||
static osThreadId_t thread_alert;
|
||||
|
||||
@ -40,6 +40,7 @@ chassis_init(&chassis,&Config_GetRobotParam()->chassis,CHASSIS_FREQ);
|
||||
#include "bsp/can.h"
|
||||
#include "device/motor_rm.h"
|
||||
#include "device/referee.h"
|
||||
#include "device/supercap.h"
|
||||
#include "component/pid.h"
|
||||
#include "component/filter.h"
|
||||
|
||||
@ -482,6 +483,8 @@ void Chassis_Setoutput(Chassis_t *c)
|
||||
/* 正数展开 */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief 导出底盘数据
|
||||
*
|
||||
|
||||
@ -19,9 +19,13 @@
|
||||
Chassis_t chassis;
|
||||
Chassis_CMD_t cmd_chassis;
|
||||
Referee_ChassisUI_t chassis_ui;
|
||||
Referee_ForCap_t Chassis_Cap;
|
||||
/* USER STRUCT END */
|
||||
|
||||
/* Private function --------------------------------------------------------- */
|
||||
/* USER PRIVATE CODE BEGIN */
|
||||
|
||||
/* USER PRIVATE CODE END */
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void Task_chassis_ctrl(void *argument) {
|
||||
(void)argument; /* 未使用argument,消除警告 */
|
||||
@ -42,9 +46,10 @@ void Task_chassis_ctrl(void *argument) {
|
||||
/* USER CODE BEGIN */
|
||||
/*接受cmd任务数据*/
|
||||
if(osMessageQueueGet(task_runtime.msgq.chassis.cmd, &cmd_chassis, NULL, 0)==osOK);
|
||||
|
||||
osMessageQueueGet(task_runtime.msgq.referee.cap, &Chassis_Cap, NULL, 0);//
|
||||
Chassis_update(&chassis);
|
||||
Chassis_Control(&chassis, &cmd_chassis,tick);
|
||||
PowerLimit_Output(Chassis_Cap.chassis_power_limit,chassis.out.Radder_DIR,8);
|
||||
Chassis_Setoutput(&chassis);
|
||||
/* 底盘UI */
|
||||
Chassis_DumpUI(&chassis, &chassis_ui);
|
||||
|
||||
@ -75,3 +75,10 @@
|
||||
function: Task_super_cap
|
||||
name: super_cap
|
||||
stack: 256
|
||||
- delay: 0
|
||||
description: ''
|
||||
freq_control: true
|
||||
frequency: 500.0
|
||||
function: Task_vt13
|
||||
name: vt13
|
||||
stack: 256
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
/* Includes ----------------------------------------------------------------- */
|
||||
#include "task/user_task.h"
|
||||
/* USER INCLUDE BEGIN */
|
||||
|
||||
#include "device/dr16.h"
|
||||
/* USER INCLUDE END */
|
||||
|
||||
/* Private typedef ---------------------------------------------------------- */
|
||||
@ -14,7 +14,8 @@
|
||||
/* Private macro ------------------------------------------------------------ */
|
||||
/* Private variables -------------------------------------------------------- */
|
||||
/* USER STRUCT BEGIN */
|
||||
|
||||
DR16_t dr16;
|
||||
//CMD_RC_t cmd_rc;
|
||||
/* USER STRUCT END */
|
||||
|
||||
/* Private function --------------------------------------------------------- */
|
||||
@ -33,13 +34,23 @@ void Task_dr16(void *argument) {
|
||||
|
||||
uint32_t tick = osKernelGetTickCount(); /* 控制任务运行频率的计时 */
|
||||
/* USER CODE INIT BEGIN */
|
||||
|
||||
DR16_Init(&dr16); /* 初始化dr16 */
|
||||
/* USER CODE INIT END */
|
||||
|
||||
while (1) {
|
||||
tick += delay_tick; /* 计算下一个唤醒时刻 */
|
||||
/* USER CODE BEGIN */
|
||||
// DR16_StartDmaRecv(&dr16);
|
||||
// if (DR16_WaitDmaCplt(20)) {
|
||||
// DR16_ParseData(&dr16);
|
||||
//
|
||||
// }
|
||||
// else {
|
||||
// DR16_Offline(&dr16);
|
||||
// }
|
||||
|
||||
osMessageQueueReset(task_runtime.msgq.rc.dr16);
|
||||
osMessageQueuePut(task_runtime.msgq.rc.dr16,&dr16, 0, 0);
|
||||
/* USER CODE END */
|
||||
osDelayUntil(tick); /* 运行结束,等待下一次唤醒 */
|
||||
}
|
||||
|
||||
@ -23,6 +23,9 @@ Referee_GimbalUI_t gimbal_ui;
|
||||
/* USER STRUCT END */
|
||||
|
||||
/* Private function --------------------------------------------------------- */
|
||||
/* USER PRIVATE CODE BEGIN */
|
||||
|
||||
/* USER PRIVATE CODE END */
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void Task_gimbal_ctrl(void *argument) {
|
||||
(void)argument; /* 未使用argument,消除警告 */
|
||||
|
||||
@ -46,6 +46,7 @@ void Task_Init(void *argument) {
|
||||
task_runtime.thread.gimbal_ctrl = osThreadNew(Task_gimbal_ctrl, NULL, &attr_gimbal_ctrl);
|
||||
task_runtime.thread.chassis_ctrl = osThreadNew(Task_chassis_ctrl, NULL, &attr_chassis_ctrl);
|
||||
task_runtime.thread.super_cap = osThreadNew(Task_super_cap, NULL, &attr_super_cap);
|
||||
task_runtime.thread.vt13 = osThreadNew(Task_vt13, NULL, &attr_vt13);
|
||||
|
||||
// 创建消息队列
|
||||
/* USER MESSAGE BEGIN */
|
||||
|
||||
@ -64,3 +64,8 @@ const osThreadAttr_t attr_super_cap = {
|
||||
.priority = osPriorityNormal,
|
||||
.stack_size = 256 * 4,
|
||||
};
|
||||
const osThreadAttr_t attr_vt13 = {
|
||||
.name = "vt13",
|
||||
.priority = osPriorityNormal,
|
||||
.stack_size = 256 * 4,
|
||||
};
|
||||
@ -24,6 +24,7 @@ extern "C" {
|
||||
#define GIMBAL_CTRL_FREQ (500.0)
|
||||
#define CHASSIS_CTRL_FREQ (500.0)
|
||||
#define SUPER_CAP_FREQ (500.0)
|
||||
#define VT13_FREQ (500.0)
|
||||
|
||||
/* 任务初始化延时ms */
|
||||
#define TASK_INIT_DELAY (100u)
|
||||
@ -38,6 +39,7 @@ extern "C" {
|
||||
#define GIMBAL_CTRL_INIT_DELAY (0)
|
||||
#define CHASSIS_CTRL_INIT_DELAY (0)
|
||||
#define SUPER_CAP_INIT_DELAY (0)
|
||||
#define VT13_INIT_DELAY (0)
|
||||
|
||||
/* Exported defines --------------------------------------------------------- */
|
||||
/* Exported macro ----------------------------------------------------------- */
|
||||
@ -58,6 +60,7 @@ typedef struct {
|
||||
osThreadId_t gimbal_ctrl;
|
||||
osThreadId_t chassis_ctrl;
|
||||
osThreadId_t super_cap;
|
||||
osThreadId_t vt13;
|
||||
} thread;
|
||||
|
||||
/* USER MESSAGE BEGIN */
|
||||
@ -129,6 +132,7 @@ typedef struct {
|
||||
UBaseType_t gimbal_ctrl;
|
||||
UBaseType_t chassis_ctrl;
|
||||
UBaseType_t super_cap;
|
||||
UBaseType_t vt13;
|
||||
} stack_water_mark;
|
||||
|
||||
/* 各任务运行频率 */
|
||||
@ -144,6 +148,7 @@ typedef struct {
|
||||
float gimbal_ctrl;
|
||||
float chassis_ctrl;
|
||||
float super_cap;
|
||||
float vt13;
|
||||
} freq;
|
||||
|
||||
/* 任务最近运行时间 */
|
||||
@ -159,6 +164,7 @@ typedef struct {
|
||||
float gimbal_ctrl;
|
||||
float chassis_ctrl;
|
||||
float super_cap;
|
||||
float vt13;
|
||||
} last_up_time;
|
||||
|
||||
} Task_Runtime_t;
|
||||
@ -179,6 +185,7 @@ extern const osThreadAttr_t attr_shoot_ctrl;
|
||||
extern const osThreadAttr_t attr_gimbal_ctrl;
|
||||
extern const osThreadAttr_t attr_chassis_ctrl;
|
||||
extern const osThreadAttr_t attr_super_cap;
|
||||
extern const osThreadAttr_t attr_vt13;
|
||||
|
||||
/* 任务函数声明 */
|
||||
void Task_Init(void *argument);
|
||||
@ -193,6 +200,7 @@ void Task_shoot_ctrl(void *argument);
|
||||
void Task_gimbal_ctrl(void *argument);
|
||||
void Task_chassis_ctrl(void *argument);
|
||||
void Task_super_cap(void *argument);
|
||||
void Task_vt13(void *argument);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
54
User/task/vt13.c
Normal file
54
User/task/vt13.c
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
vt13 Task
|
||||
|
||||
*/
|
||||
|
||||
/* Includes ----------------------------------------------------------------- */
|
||||
#include "task/user_task.h"
|
||||
/* USER INCLUDE BEGIN */
|
||||
#include "device/vt13.h"
|
||||
/* USER INCLUDE END */
|
||||
|
||||
/* Private typedef ---------------------------------------------------------- */
|
||||
/* Private define ----------------------------------------------------------- */
|
||||
/* Private macro ------------------------------------------------------------ */
|
||||
/* Private variables -------------------------------------------------------- */
|
||||
/* USER STRUCT BEGIN */
|
||||
VT13_t vt13;
|
||||
/* USER STRUCT END */
|
||||
|
||||
/* Private function --------------------------------------------------------- */
|
||||
/* USER PRIVATE CODE BEGIN */
|
||||
|
||||
/* USER PRIVATE CODE END */
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void Task_vt13(void *argument) {
|
||||
(void)argument; /* 未使用argument,消除警告 */
|
||||
|
||||
|
||||
/* 计算任务运行到指定频率需要等待的tick数 */
|
||||
const uint32_t delay_tick = osKernelGetTickFreq() / VT13_FREQ;
|
||||
|
||||
osDelay(VT13_INIT_DELAY); /* 延时一段时间再开启任务 */
|
||||
|
||||
uint32_t tick = osKernelGetTickCount(); /* 控制任务运行频率的计时 */
|
||||
/* USER CODE INIT BEGIN */
|
||||
VT13_Init(&vt13);
|
||||
/* USER CODE INIT END */
|
||||
|
||||
while (1) {
|
||||
tick += delay_tick; /* 计算下一个唤醒时刻 */
|
||||
/* USER CODE BEGIN */
|
||||
VT13_StartDmaRecv(&vt13);
|
||||
if (VT13_WaitDmaCplt(20)) {
|
||||
VT13_ParseData(&vt13);
|
||||
} else {
|
||||
VT13_Offline(&vt13);
|
||||
}
|
||||
|
||||
|
||||
/* USER CODE END */
|
||||
osDelayUntil(tick); /* 运行结束,等待下一次唤醒 */
|
||||
}
|
||||
|
||||
}
|
||||
@ -388,11 +388,12 @@ USART1.IPParameters=VirtualMode
|
||||
USART1.VirtualMode=VM_ASYNC
|
||||
USART2.IPParameters=VirtualMode
|
||||
USART2.VirtualMode=VM_ASYNC
|
||||
USART3.BaudRate=100000
|
||||
USART3.IPParameters=VirtualMode,BaudRate,WordLength,Parity
|
||||
USART3.Parity=PARITY_EVEN
|
||||
USART3.BaudRate=921600
|
||||
USART3.IPParameters=VirtualMode,BaudRate,WordLength,Parity,Mode
|
||||
USART3.Mode=MODE_RX
|
||||
USART3.Parity=PARITY_NONE
|
||||
USART3.VirtualMode=VM_ASYNC
|
||||
USART3.WordLength=WORDLENGTH_9B
|
||||
USART3.WordLength=WORDLENGTH_8B
|
||||
USART6.IPParameters=VirtualMode
|
||||
USART6.VirtualMode=VM_ASYNC
|
||||
VP_FREERTOS_VS_CMSIS_V2.Mode=CMSIS_V2
|
||||
|
||||
Loading…
Reference in New Issue
Block a user