Thermal monitoring: surface chip thermal meter + health bucket#103
Merged
Conversation
Add a read-only thermal probe across the whole Jaguar family so an
operator can attribute a TX drop to the chip heating up.
The thermal meter (RF[A] reg 0x42, bits [15:10]) was already sampled
inside the 8812A TX-power-tracking loop, but only there: gated to
CHIP_8812, logged at debug, and never surfaced as health. This exposes
it independently of the power-track correction.
- RadioManagementModule::ReadThermalStatus() reads RF[A][0x42] standalone
(no chip gate, no BB-swing write) and pairs it with the EFUSE baseline,
returning a ThermalStatus{raw, baseline, delta, valid}. Works on
8812/8811/8814/8821 (path A is readable on all members).
- ThermalBucket() classifies the delta into cool/warm/hot/critical. The
meter has no calibrated degC transfer function on the AU family (it is
an RF/PA-bias tracking index), so the health signal is deliberately
bucketed rather than presented as a fake temperature.
- RtlJaguarDevice exposes GetThermalStatus() (synchronous, owning-thread
safe) plus an opt-in background poller (start_thermal_poller /
get_thermal_snapshot) mirroring the queue-depth poller, with the same
shared-handle concurrency caveat.
- Demos honour DEVOURER_THERMAL_POLL_MS / DEVOURER_THERMAL_WARN_DELTA and
emit <devourer-thermal> lines; the TX demo reads inline on its own
thread (no USB contention), the RX demo uses the background poller. A
one-shot warn fires when delta crosses the threshold and re-arms on
cooldown.
- tests/thermal_hwcheck.sh: per-chip hardware smoke test.
Jaguar-1 has no automatic hard thermal TX shutdown, so a rising delta is
an early warning that the PA is heating and TX power is being backed off,
not a shutdown-reason readout.
Verified on hardware (8812/8814/8821): meter reads live, delta tracks PA
heat from a cold start through to a warm/hot steady state, and the bucket
+ warn move correctly with physical state. Build green, ctest green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a read-only thermal probe across the whole Jaguar family (RTL8812AU / 8811AU / 8814AU / 8821AU) so an operator can attribute a TX drop to the chip heating up.
The thermal meter (RF path-A reg
0x42, bits[15:10]) was already sampled inside the 8812A TX-power-tracking loop — but only there: gated toCHIP_8812, logged atdebug, and never surfaced as health. This exposes it independently of the power-track correction, on every chip.How
RadioManagementModule::ReadThermalStatus()— reads RF[A]0x42standalone (no chip gate, no BB-swing write) and pairs it with the EFUSE baseline →ThermalStatus{raw, baseline, delta, valid}. Path A is readable on all members.ThermalBucket()— classifiesdeltaintocool/warm/hot/critical. The meter has no calibrated °C transfer function on the AU family (it's an RF/PA-bias tracking index), so the health signal is deliberately bucketed rather than presented as a fake temperature.RtlJaguarDevice—GetThermalStatus()(synchronous, owning-thread safe) plus an opt-in background poller (start_thermal_poller/get_thermal_snapshot) mirroring the existing queue-depth poller, with the same shared-handle concurrency caveat documented.DEVOURER_THERMAL_POLL_MS/DEVOURER_THERMAL_WARN_DELTA, emitting<devourer-thermal>raw=.. baseline=.. delta=.. status=..lines. TX demo reads inline on its own thread (no USB contention); RX demo uses the background poller. A one-shotwarnfires whendeltacrosses the threshold and re-arms on cooldown.tests/thermal_hwcheck.sh— per-chip hardware smoke test.Jaguar-1 has no automatic hard thermal TX shutdown, so a rising
deltais an early warning that the PA is heating and TX power is being backed off — not a shutdown-reason readout.Verification
ctestgreen (stream_stdin_binary).deltatracks PA heat from a cold start (e.g. 8812 colddelta=+0 cool→ sustained TX equilibriumdelta=+10 warm, ~17.5k frames confirmed sending), and the bucket + warn move correctly with physical state (including readingcoolright after a physical detach). An 8811AU rides the same code path automatically (none on the bus to test).🤖 Generated with Claude Code