How aimethercat/ecatv2_ax58100_h750_universal works
This is STM32H750 firmware for an AX58100 EtherCAT slave, exposing configurable robotics peripherals to an EtherCAT master. The main runtime path is board startup, EtherCAT slave communication, task-list loading, then periodic peripheral tasks; task management also watches master connectivity and notifies running tasks for connection-loss handling. The README documents safe actuator states, state-change reset behavior, and the supported peripheral families. Sampled source confirms startup and task dispatch; detailed SOES internals and several peripheral implementations were not sampled, so their wiring is shown only where documented or evident from the task manager.
Main entry points: task_manager.cpp Runnable threads · soes_application.cpp SOES application · initializer.cpp Initialization · freertos.c FreeRTOS scheduler
Components 18
Startup and scheduling
- STM32H750
Core/Src/main.c - Initialization
Application/initializer.cpp - FreeRTOS scheduler
Core/Src/freertos.c
EtherCAT slave
- SOES application
Application/soes_application.cpp - AX58100 ESC
Dynamic task runtime
- Task manager
Application/task_manager.cpp - Task definitions
Application/task_defs.hpp - EtherCAT arguments
Utils/buffer_utils.cpp - Runnable threads
Application/task_manager.cpp - Connection handling
Application/task_manager.cpp
Peripheral interfaces
- RC receivers
Application/Task/dbus_rc.cpp - Motor control
Application/Task/lk_motor.cpp - DSHOT ESC output
Application/Task/dshot.cpp - PWM outputs
Application/Task/pwm_onboard.cpp - Sensors and power
Application/Task/adc.cpp - CAN peripherals
Application/Task/hipnuc_imu_can.cpp - External PWM
Application/Task/pwm_external.cpp
Other components
- EtherCAT master
Connections 19
- EtherCAT master → AX58100 ESC: exchanges EtherCAT
- AX58100 ESC → SOES application: provides slave interface
- STM32H750 → Initialization: calls initialize
- Initialization → FreeRTOS scheduler: prepares scheduler
- FreeRTOS scheduler → Task manager: schedules
- EtherCAT master → SOES application: sends task configuration
- SOES application → Task manager: signals task readiness
- Task manager → EtherCAT arguments: reads arguments
- Task manager → Task definitions: selects task type
- Task manager → Runnable threads: creates runnable threads
- Runnable threads → RC receivers: runs selected task
- Runnable threads → Motor control: runs selected task
- Runnable threads → DSHOT ESC output: runs selected task
- Runnable threads → PWM outputs: runs selected task
- Runnable threads → Sensors and power: runs selected task
- Runnable threads → CAN peripherals: runs selected task
- Runnable threads → External PWM: runs selected task
- Task manager → Connection handling: monitors connection
- Connection handling → Runnable threads: notifies loss or recovery