Examples¶
Every buildable app in examples/esp32. Each app is one main/*.cpp file selected by name
at build time; the table below is generated from the app list and each file's description, so it always matches the
code.
Run one¶
cd examples/esp32
./scripts/build_app.sh <app> Release
./scripts/flash_app.sh flash_monitor <app> Release
vortex_api_test is the place to start: it initialises the whole HAL and exercises every manager. On a complete
bench (motor supply on, sensors fitted) turn on its strict checks in idf.py menuconfig, under
Vortex API test (vortex_api_test), so that wiring or supply problems fail the test instead of only logging.
Motor benches move the motor
The apps under Motor benches spin a motor. Clamp the motor, set current limits for it, and read the bench matrix and the BLDC bring-up notes first.
Catalogue¶
From examples/esp32/app_config.yml
and each source file's @brief; do not edit.
31 apps, 31 built by CI on every pull request. Target esp32c6, ESP-IDF release/v5.5.
Start here¶
App (APP_TYPE) |
What it does | CI | Source |
|---|---|---|---|
vortex_api_test |
Primary hardware integration test for the Vortex HAL on ESP32 (noexcept) | yes | vortex_api_test.cpp |
Manager tests¶
App (APP_TYPE) |
What it does | CI | Source |
|---|---|---|---|
gpio_stress_test |
GPIO manager focused stress test for ESP32 | yes | gpio_stress_test.cpp |
adc_calibration_test |
ADC manager focused calibration & reading test for ESP32 | yes | adc_calibration_test.cpp |
motor_controller_test |
Motor controller focused test for ESP32 Shares its source with motor_controller_uart_test; selected by EXAMPLE_TYPE_motor_controller_test. |
yes | motor_controller_test.cpp |
motor_controller_uart_test |
Motor controller focused test for ESP32 Shares its source with motor_controller_test; selected by EXAMPLE_TYPE_motor_controller_uart_test. |
yes | motor_controller_test.cpp |
encoder_imu_test |
Encoder & IMU manager focused test for ESP32 | yes | encoder_imu_test.cpp |
led_temp_test |
LED & Temperature manager focused test for ESP32 | yes | led_temp_test.cpp |
TMCL parameter tools¶
App (APP_TYPE) |
What it does | CI | Source |
|---|---|---|---|
vortex_tmcl_param_scan |
Exhaustive TMCL read probe: GAP on motor 0 (Table 57 NRs 0…334, gaps skipped) + GGP (banks 0, 2, 3) over numeric TYPE ranges. Shares its source with vortex_tmcl_param_scan_spi; selected by EXAMPLE_TYPE_vortex_tmcl_param_scan. |
yes | vortex_tmcl_param_scan.cpp |
vortex_tmcl_param_scan_spi |
Exhaustive TMCL read probe: GAP on motor 0 (Table 57 NRs 0…334, gaps skipped) + GGP (banks 0, 2, 3) over numeric TYPE ranges. Shares its source with vortex_tmcl_param_scan; selected by EXAMPLE_TYPE_vortex_tmcl_param_scan_spi. |
yes | vortex_tmcl_param_scan.cpp |
vortex_tmcl_param_scan_post_config |
Post-config TMCL read probe — same sweep as vortex_tmcl_param_scan but runs AFTER configure_complete_bldc() so the chip is in MOTOR_TYPE = BLDC_MOTOR with DRV_EN asserted before any GAP is issued. Shares its source with vortex_tmcl_param_scan_post_config_spi; selected by EXAMPLE_TYPE_vortex_tmcl_param_scan_post_config. |
yes | vortex_tmcl_param_scan_post_config.cpp |
vortex_tmcl_param_scan_post_config_spi |
Post-config TMCL read probe — same sweep as vortex_tmcl_param_scan but runs AFTER configure_complete_bldc() so the chip is in MOTOR_TYPE = BLDC_MOTOR with DRV_EN asserted before any GAP is issued. Shares its source with vortex_tmcl_param_scan_post_config; selected by EXAMPLE_TYPE_vortex_tmcl_param_scan_post_config_spi. |
yes | vortex_tmcl_param_scan_post_config.cpp |
vortex_tmcl_manual_compliance |
ESP32 harness: representative TMCL operations vs TMC9660 Parameter Mode Reference Manual (Analog Devices Rev 0, 02/25). | yes | vortex_tmcl_manual_compliance.cpp |
vortex_tmcl_param_existence |
ESP32 harness: per-NR read path inventory (GAP vs GGP) for TMC9660 parameter mode ROM. | yes | vortex_tmcl_param_existence.cpp |
vortex_tmcl_gap_smoke |
Minimal TMCL-over-UART check: init onboard TMC9660 on UART, one GAP read (type 0, motor 0). | yes | vortex_tmcl_gap_smoke.cpp |
Motor benches (motion)¶
App (APP_TYPE) |
What it does | CI | Source |
|---|---|---|---|
vortex_bldc_open_loop |
Open-loop BLDC spin on the onboard SPI TMCL path (PCAL mux enables SPI_COMM_EN — see Vortex::SetOnboardTmc9660Transport). Uses the same Vortex power-stage workaround as vortex_bldc_open_loop_uart: disable UVW VGS-short protection defaults before entering FOC_OPENLOOP_VOLTAGE_MODE. |
yes | vortex_bldc_open_loop.cpp |
vortex_bldc_dynamics |
Closed-loop hall-FOC dynamics test for a robot-dog-class BLDC actuator. Same multi-phase trajectory as before, but with FOC_HALL_SENSOR commutation so the chip can hold synchronism through the aggressive ramps that pole-slipped under open-loop voltage mode. |
yes | vortex_bldc_dynamics.cpp |
vortex_bldc_open_loop_uart |
Confirmed-working open-loop current-mode BLDC bring-up over the TMC9660 UART transport. Spins the bench motor under FOC_OPENLOOP_CURRENT_MODE with full live telemetry of the electrical angle, per-phase currents and the inverter voltage commands. |
yes | vortex_bldc_open_loop_uart.cpp |
vortex_bldc_probe |
Comprehensive read/write probe for the Vortex V1 + TMC9660 BLDC stack. | yes | vortex_bldc_probe.cpp |
vortex_bldc_velocity_foc_hall |
Hall-FOC velocity loop bench — full bring-up + velocity profile. | yes | vortex_bldc_velocity_foc_hall.cpp |
vortex_bldc_velocity_foc_abn |
ABN-FOC velocity loop bench — full bring-up + velocity profile. | yes | vortex_bldc_velocity_foc_abn.cpp |
vortex_bldc_position_foc_as5047 |
Position loop on ABN-style feedback — AS5047U angle via EncoderManager; TMC uses ABN CPR. | yes | vortex_bldc_position_foc_as5047.cpp |
vortex_bldc_abn_as5047_dynamics |
Closed-loop ABN-FOC velocity test with dual rotor-position feedback paths exposed to the host: | yes | vortex_bldc_abn_as5047_dynamics.cpp |
vortex_bldc_torque_foc_hall |
Hall-FOC torque-mode bench — direct Iq command (no velocity loop). | yes | vortex_bldc_torque_foc_hall.cpp |
Board bring-up and smoke tests¶
App (APP_TYPE) |
What it does | CI | Source |
|---|---|---|---|
vortex_led_ws2812_smoke |
WS2812 smoke + visual demo on Vortex V1 (LedManager, pincfg WS2812_LED_DAT / GPIO3). |
yes | vortex_led_ws2812_smoke.cpp |
vortex_led_ws2812_cycle |
Continuous WS2812 exercise: colours, brightness, rainbow, breath, blink (infinite loop). | yes | vortex_led_ws2812_cycle.cpp |
vortex_i2c_scan_pcal_bno_pca |
I2C bring-up: shared bus devices after HAL init — PCAL95555, BNO08x, optional PCA9685. | yes | vortex_i2c_scan_pcal_bno_pca.cpp |
vortex_pcal_gpio_imu_bringup |
PCAL95555 + IMU (BNO08x) bring-up with full I²C diagnostics. | yes | vortex_pcal_gpio_imu_bringup.cpp |
vortex_i2c_la_trace |
Minimal, slow I²C patterns for logic-analyzer correlation with UART. | yes | vortex_i2c_la_trace.cpp |
vortex_motor_comms_smoke |
TMC9660 comms smoke: PCAL95555 control-line readback, bootloader bring-up, telemetry (no motion). | yes | vortex_motor_comms_smoke.cpp |
vortex_bldc_telemetry_sweep |
No-motion telemetry / configuration smoke test for the TMC9660 power stage. | yes | vortex_bldc_telemetry_sweep.cpp |
vortex_brake_dissipator_gpio |
GPIO-level exercise of TMC9660 chip GPIO lines (brake / dissipator paths per schematic). | yes | vortex_brake_dissipator_gpio.cpp |