How am32-firmware/am32 works
AM32 is embedded ESC firmware for brushless motors, with MCU-specific hardware support and a shared control application. The principal workflow is that a flight controller or configurator supplies throttle/control input; the firmware processes it and drives the motor, while ESC telemetry can be returned. The README also documents firmware updating, crawler-oriented builds, and multiple input protocols. The shared entry point and target configuration are identified in source excerpts; many feature-specific implementation links are based on documented capabilities because their source was not sampled.
Main entry points: main.c ESC firmware · dshot.c DShot protocol · Mcu Servo PWM input · DroneCAN.c DroneCAN support
Components 21
Firmware control
- ESC firmware
Src/main.c - Motor control
Src/main.c - Sinusoidal startup
Src/main.c - PWM frequency
Src/main.c - Crawler support
Mcu
Control and telemetry
- DShot protocol
Src/dshot.c - Servo PWM input
Mcu - KISS telemetry
Mcu - DroneCAN support
Src/DroneCAN/DroneCAN.c
MCU hardware
- MCU peripherals
Mcu/f051/Src/peripherals.c - ADC sampling
Mcu/f051/Src/ADC.c - Commutation sensing
Mcu/f051/Src/comparator.c - Phase outputs
Mcu/f051/Src/phaseouts.c
Configuration and updates
- Target configuration
Inc/targets.h - Serial update
Mcu - Passthrough update
Mcu - Arduino update
Mcu - Settings storage
Mcu/f051/Src/eeprom.c
Other components
- Flight controller
- Configurator
- Brushless motor
Connections 24
- Flight controller → DShot protocol: sends DShot
- Flight controller → Servo PWM input: sends servo PWM
- DShot protocol → ESC firmware: provides input
- Servo PWM input → ESC firmware: provides input
Src/main.c - ESC firmware → Motor control: controls
Src/main.c - Motor control → Brushless motor: drives
- ESC firmware → Sinusoidal startup: supports startup
Src/main.c - ESC firmware → PWM frequency: varies frequency
Src/main.c - ESC firmware → KISS telemetry: provides telemetry
Src/main.c - KISS telemetry → Flight controller: reports ESC data
- ESC firmware → MCU peripherals: initializes peripherals
- ESC firmware → Target configuration: uses target settings
Src/main.c - ESC firmware → ADC sampling: samples inputs
- ESC firmware → Commutation sensing: uses commutation sensing
- ESC firmware → Phase outputs: controls phases
- ESC firmware → Settings storage: loads settings
- Configurator → Passthrough update: updates firmware
- Configurator → Serial update: updates firmware
- Configurator → Arduino update: updates firmware
- Passthrough update → ESC firmware: installs firmware
Src/main.c - Serial update → ESC firmware: installs firmware
Src/main.c - Arduino update → ESC firmware: installs firmware
Src/main.c - ESC firmware → DroneCAN support: supports CAN
- ESC firmware → Crawler support: supports crawler builds
Src/main.c