How team-roboto/h7_embedded_control_code works
This is STM32H723 robot-control firmware for a DaMiao MC02 board. The documented workflow starts with remote input and sensor feedback, updates robot state, computes chassis, gimbal and shooting control, and communicates with actuators and a Jetson-class host. The graph also preserves referee/UI reporting and the internal algorithms and board-support layer. Task and peripheral wiring is based on the README and file tree; unsampled task implementations limit the edges shown.
Main entry points: Control_Task.c Control task · chassis_control.c Chassis control · UI_Task.c HUD task · USB_MiniPC_Task.c USB host task
Components 28
Runtime tasks
- Control task
Application/Task/Src/Control_Task.c - CAN task
Application/Task/Src/CAN_Task.c - INS task
Application/Task/Src/INS_Task.c - Detection task
Application/Task/Src/Detect_Task.c - HUD task
Application/Task/Src/UI_Task.c - USB host task
Application/Task/Src/USB_MiniPC_Task.c - Chassis task
Application/Task/Src/Chassis_Task.c - Gimbal task
Application/Task/Src/Gimbal_Task.c - Shooting task
Application/Task/Src/Shooting_Task.c
Robot control
- State machine
Components/Controller/Src/state_machine.c - Chassis control
Components/Controller/Src/chassis_control.c - Gimbal control
Components/Controller/Src/gimbal_control.c - Shooting control
Components/Controller/Src/shooting_control.c - Power estimation
Components/Controller/Src/power_estimation.c - Control algorithms
Components/Algorithm/Src/PID.c
Devices and links
- Remote control
Components/Device/Src/Remote_Control.c - IMU driver
Components/Device/Src/Bmi088.c - Motor drivers
Components/Device/Src/Motor.c - Referee interface
Components/Device/Src/Referee_System.c - MiniPC protocol
Components/Device/Src/MiniPC.c - Image transmission
Components/Device/Src/Image_Transmission.c
Platform support
- MCU startup
Core/Src/main.c - CAN board support
BSP/Src/bsp_can.c - UART board support
BSP/Src/bsp_uart.c - USB CDC
USB_DEVICE/App/usbd_cdc_if.c - Sensor peripherals
BSP/Src/bsp_spi.c
Other components
- Jetson host
- Remote operator
Connections 30
- MCU startup → Control task: starts scheduler
- Remote operator → Remote control: sends input
- Remote control → Control task: provides commands
- Sensor peripherals → IMU driver: supports acquisition
- IMU driver → INS task: provides measurements
- Control task → State machine: updates state
- Control task → Chassis control: runs control
- Control task → Gimbal control: runs control
- Control task → Shooting control: runs control
- Control task → Power estimation: estimates power
- Chassis task → Chassis control: controls chassis
- Gimbal task → Gimbal control: controls gimbal
- Shooting task → Shooting control: controls shooting
- Chassis control → Control algorithms: uses PID
- Gimbal control → Control algorithms: uses PID
- Shooting control → Control algorithms: uses PID
- CAN task → CAN board support: uses CAN
- CAN board support → Motor drivers: transfers frames
- Motor drivers → CAN board support: returns feedback
- HUD task → Referee interface: reads status
- HUD task → Remote control: reads controls
- HUD task → Chassis control: reads state
- Jetson host → USB host task: sends commands
- USB host task → USB CDC: uses CDC
- USB host task → MiniPC protocol: handles protocol
- MiniPC protocol → UART board support: uses UART
- UART board support → Jetson host: exchanges telemetry
- Jetson host → MiniPC protocol: sends commands
- Detection task → Image transmission: handles imagery
- Image transmission → Jetson host: transmits images