Skip to content

Add HWCI test rig instrumentation on top of pristine upstream AM32#20

Draft
AlexKlimaj wants to merge 7 commits into
mainfrom
main_instrumented
Draft

Add HWCI test rig instrumentation on top of pristine upstream AM32#20
AlexKlimaj wants to merge 7 commits into
mainfrom
main_instrumented

Conversation

@AlexKlimaj

Copy link
Copy Markdown
Member

Baseline branch for hardware-in-the-loop testing: unmodified am32-firmware/AM32 main plus only the ARK hwci test harness (hwci/, hwci_perf opt-in instrumentation, and the .github hwci workflow). Excludes all ARK-specific performance and correctness changes (Q16 duty-cycle/setInput math, F051 RAM-function placement, F051 SysTick-no-IRQ, ISR-shared volatile fixes, MCU extern-decl fixes) so this can serve as a stock-firmware baseline to compare against.

claude and others added 7 commits July 2, 2026 23:58
Baseline branch for hardware-in-the-loop testing: unmodified
am32-firmware/AM32 main plus only the ARK hwci test harness (hwci/,
hwci_perf opt-in instrumentation, and the .github hwci workflow).
Excludes all ARK-specific performance and correctness changes
(Q16 duty-cycle/setInput math, F051 RAM-function placement, F051
SysTick-no-IRQ, ISR-shared volatile fixes, MCU extern-decl fixes)
so this can serve as a stock-firmware baseline to compare against.
…metrics

Port of the jitter work from ark-release (ffa0414) onto the pristine
upstream instrumentation branch: hwci_perf struct v2 (zc_count /
zc_jitter_sum / zc_interval_sum / zc_jitter_max), HWCI_PERF_ZC() hook at
the end of PeriodElapsedCallback, v1+v2 host decoder, jitter columns and
report-only zc_jitter_pct metrics, stale-object guard in hwci build.
Firmware outside HWCI_PERF builds is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Captured from runs/upstream-sweep (fresh-ish 6S pack, 24.5 V resting),
verified by an independent repeat run. Kept separate from the ark-release
baseline: same rig, different firmware lineage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bring the ark-release SITL stack (Mcu/SITL, native build, CI workflow,
DroneCAN mcast driver, and shared MCU_SITL hooks) onto main_instrumented
without ARK control-path refactors. Leaves HWCI instrumentation intact so
this branch is upstream AM32 + hardware CI tools + SITL for baseline
comparisons against ark-release.
CI saw residual ~2k rpm after 3s freewheel (limit 800). Wait 5s so
prop coast-down under load is not flaky.
Expose bidirectional DShot health in HWCI_PERF (rx good/bad, tx frames,
telem/EDT mode, last packed period) for SWD correlation with a BDShot host.

Host decoder/sim/CSV gain v3 fields; add PX4 USB capture and PSU-safe
ACTUATOR_TEST sustain script, bdshot_smoke profile, and baseline docs.
Validated on ARK FPV PX4 1.18 + AM32 free-run with pack voltage and eRPM.
Two exclusive setups used at different times:

- SETUP A: Flight Stand drives uni DShot (rig.yaml / rig.flightstand.yaml,
  hwci run + noprop profiles). No PX4 on the signal pin.
- SETUP B: ARK FPV BDShot owns the pin (rig.px4_bdshot.yaml with
  throttle_backend none, px4_motor_stream / capture scripts).

Add NullThrottle, BENCH_SETUPS.md, and clear labels on scripts/profiles
so the two paths cannot be mixed by accident.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants