How alkamotors/am32 works
AM32 is embedded ESC firmware for controlling brushless motors. Its principal workflow is receiving throttle/control signals, interpreting motor commands, and driving the ESC hardware; it also supports configuration, telemetry, and multiple MCU/ESC targets. The main loop excerpt shows initialization and periodic control work, while the README documents the supported protocols and startup modes. Several implementation files are listed but not excerpted, so uncertain internal call relationships are omitted or marked unverified.
Main entry points: main.c Firmware main loop · peripherals.c MCU peripherals · signal.c Signal capture · dshot.c DShot protocol
Components 13
Control and drive
- Firmware main loop
Src/main.c - Motor commutation
Src/main.c
Command and telemetry
- Signal capture
Src/signal.c - DShot protocol
Src/dshot.c - Serial telemetry
Mcu/e230/Src/serial_telemetry.c - DroneCAN support
Src/DroneCAN/DroneCAN.c
ESC hardware
- MCU peripherals
Mcu/e230/Src/peripherals.c - ADC sensing
Mcu/e230/Src/ADC.c - ESC I/O
Mcu/e230/Src/IO.c
Settings and targets
- Settings storage
Mcu/e230/Src/eeprom.c - ESC target profiles
Inc/targets.h
Other components
- Flight controller / operator
- Brushless motor / ESC
Connections 12
- Flight controller / operator → Firmware main loop: controls
README.md - Firmware main loop → Signal capture: uses input
- Firmware main loop → DShot protocol: supports DShot
README.md - Firmware main loop → Motor commutation: runs control
Src/main.c - Motor commutation → MCU peripherals: drives hardware
- MCU peripherals → ADC sensing: samples sensors
- MCU peripherals → ESC I/O: controls pins
- Motor commutation → Brushless motor / ESC: drives motor
README.md - Firmware main loop → Serial telemetry: supports telemetry
README.md - Firmware main loop → DroneCAN support: optional CAN
- Firmware main loop → Settings storage: loads settings
Src/main.c - Firmware main loop → ESC target profiles: selects target
Src/main.c