Open Rust firmware for the KOWSI KWS-X1 USB-C power meter. It replaces the meter's application and keeps the original bootloader, which flashes it over USB (see Flashing). The meter is built around an HC32F460 MCU and a FUSB302B Type-C/PD controller. Its power monitor, tilt sensor and display controller behave as an INA226, a LIS3DH and an ST7789V, and the firmware drives them as such; those three parts are inferred, not confirmed (see Hardware reference documents). This project is not affiliated with or endorsed by KOWSI.
The UT01C has also been confirmed working by @paulcarroty. A teardown comparison by @tomoca2 (Japanese) found the same PCB revision and components in both units examined. This is community-tested compatibility, not a guarantee for every hardware revision.
Disclaimer. This is unofficial firmware, provided as is, without warranty of any kind. Flashing it, and using the meter with it, is entirely at your own risk. The author is not responsible for any damage to the meter, to chargers, cables or connected devices, or for any other loss. Sink mode can put up to the charger's highest voltage on the meter's output.
- Download or build
- Related repositories
- Features
- Limitations
- Using the meter
- Screens
- SCP
- FCP
- AFC
- Quick Charge
- Full charger offer and 5 A without a cable
- Hand-test checklist
- Safety
- Layout
- Hardware reference documents
- Build and validation
- Community reviews
- License
You do not need to compile the firmware yourself. Download firmware.X1C and
SHA256SUMS from a published firmware-v* release, and download the flasher
for your OS from a flasher-v* release, both on
GitHub Releases.
Verify the checksums and follow Flashing. Downloaded firmware and
flasher binaries need no Rust or Python installation.
Prefer to compile it yourself? Follow Build and validation and Package and audit offline. If no firmware release is published yet, the firmware workflow provides build artifacts for signed-in GitHub users; these are development builds, not published releases.
These repositories form one firmware project. The firmware pins each library by full Git revision, and every library is usable on its own.
| Repository | Contents |
|---|---|
| kws-x1-standalone-rs | firmware for a USB-C power meter, built on the libraries below |
| hc32f460-embassy-rs | hc32f460-pac and embassy-hc32: peripheral access crate and Embassy HAL for the HC32F460 MCU |
| embedded-charging-protocols-rs | pd-protocol, qc-protocol and single-wire-protocols: allocation-free, no_std, hardware-independent USB PD sink engine, Quick Charge, and SCP, FCP and Samsung AFC |
| usbpd | fork of elagil/usbpd: the usbpd policy engine and the usbpd-traits PHY interface |
This is kws-x1-standalone-rs.
- Another HC32F460 board: use
hc32f460-embassy-rsas it is, and take pin setup, clocks and the task layout fromfirmware/src/main.rs. - Another MCU with a FUSB302:
fusb302-pddepends only onembedded-hal-asyncI2C,pd-protocolandusbpd-traits. Implement itsPlatformtrait (power-on register baseline, measure setting, limits, timeouts) and the gated bus for your board. - Another PD controller: implement
usbpd-traitsfor it and drivepd-protocolasfusb302-pddoes. - Board-specific and not portable as is: the panel setup, the flash
layout, the bootloader image format and the
firmware-packvalidation policy.
- Voltage, current and power in either direction, with peaks and a flow direction indicator.
- D+, D-, CC1 and CC2 line voltages.
- USB PD sink: fixed profiles up to 20 V (28 V over EPR), PPS, SPR AVS (9-20 V) and EPR AVS (15-30 V), chosen on the meter.
- Quick Charge trigger: 5, 9, 12 or 20 V over D+/D−, or Quick Charge 3.0 0.2 V steps from 3.6 V, checked against VBUS, and a probe that reports Quick Charge 2.0 or 3.0 and Class A or B. On USB-C the meter switches the charger out of PD for it by itself.
- SCP: checked adapter-type and rating register reads, retained Charger-info results, and an explicit SCP page that can set the output voltage and current limit within the charger's reported ratings.
- FCP: the voltages the charger lists (such as 5.2, 9 and 12 V) and its rated power, retained Charger-info results, and an explicit FCP page that requests one of them.
- Samsung AFC: identification by a 5 V request, retained Charger-info results, and an explicit AFC page that requests 5 or 9 V.
- A full charger scan (hold OK on the charger page): Quick Charge, SCP, FCP, AFC, the PD offer, the EPR offer and, with the plug in the charger, the 5 A offer, on one page.
- Everything the charger says about itself: its full offer (EPR included), identity, ratings and status, and for a battery-powered source (a power bank, or a phone powering the meter) its battery's capacity and charge.
- Cable e-marker reading, and a 5 A cable test for the meter's plug.
- Passthrough mode: listens to the PD messages between a charger and a device without taking part.
- Brightness and auto-rotation, saved to flash.
- Charge (Ah), energy (Wh) and the time since the last reset, counted whichever page shows, and optionally kept across restarts (energy memory: Off, 5s, 10s, 30s or 60s).
- A power, voltage or current graph over the last 1, 2, 5 or 10 minutes.
What this firmware does not do, for now:
- No SCP authentication. SCP, FCP and AFC output control is only an
explicit request on their pages, never automatic.
Other protocols are not triggered. Beyond PD, QC and verified
SCP detection, the overview names the Type-C current
advertisement, the fixed D+/D- voltages some ports use to tell their
current (
DIVIDER,1.2V DCP) and the BC1.2 short once the Quick Charge test found it; a BC1.2 port looks like a plain USB port until then. - EPR is limited to 30 V, and EPR AVS is untested. Fixed 28 V works with a real EPR cable and was tested on hardware. EPR AVS up to 30 V can be selected the same way but has not been tried on a charger. Fixed 36/48 V remain informational only. The fake marker remains 20 V/non-EPR.
- Sink only. The meter never acts as a source: no power role swap, no data role swap, no VCONN swap, no Cable_Reset.
- Passthrough only listens. It cannot change or inject anything between the charger and the device, and stops listening for good after a Hard Reset, a receive overflow or a malformed frame (until the next power-up).
- Cable reading runs at fixed 5 V, needs a PD 3.0 charger and the right
orientation. Above 5 V, hold OK drops to 5 V first. VCONN reaches only one
CC pin, so a cable on the other side reads
TURN CABLE OVER. - The 5 A cable test is non-standard, and works only with the meter's plug straight in the charger. See Full charger offer and 5 A without a cable.
- No logging or export. The graph keeps ten minutes in RAM only and is lost on restart; only energy totals can persist (see What is saved). There is no USB data connection to a computer or app.
- Line voltages and ripple are not user-calibrated. Settings calibration corrects bus voltage and current, not these separate ADC inputs. The line voltages use an internal reference of 1083 mV, the stock firmware's value, rather than the reference manual's "about 1.1 V" (1100 mV, RM 16.3.2). A multimeter check on one unit matched it (D+ and D− within 5 mV from 0.55 to 3.23 V), but the manual gives no tolerance, so another unit may read a few percent off. CC1 and CC2 were not checked.
- The meter's own CC pull-down acts stronger than standard. In sink
mode the CC pin in use sits at a bit over half the usual voltage: 0.92 V
instead of 1.68 V on a 3 A charger, as if the pull-down were about 2.9 kΩ
instead of 5.1 kΩ. Why is not known yet: a multimeter on the unused CC pin
reads 4.2 kΩ, and still 6.4 kΩ with the pull-down switched off, which does
not explain the voltage. The chargers tried so far work with it. The
overview's
TYPE-Ccurrent corrects for it; the PD chip's own level reading does not, so the startupCC1/CC2status reads one level low (see PD Session). Passthrough is not affected. How the value was found:- A USB-A port with an A-to-C cable pulls CC up to VBUS through a fixed 56 kΩ resistor, so a pull-down R gives CC = VBUS × R / (56 kΩ + R). On the same port and cable, a phone's standard 5.1 kΩ read 0.46 V (passthrough) and the meter's own pull-down 0.27 V (sink mode). VBUS cancels out in the ratio: 0.27 / 0.46 = [R / (56 kΩ + R)] / [5.1 kΩ / 61.1 kΩ], so R ≈ 2.9 kΩ.
- Cross-check: six 3 A sources read 0.90–0.93 V on two meters and 1.66–1.70 V on a tester with a 5.1 kΩ pull-down. With a current-source pull-up (330 µA for 3 A), CC = 330 µA × R, so R ≈ 5.1 kΩ × 0.92 / 1.68 ≈ 2.8 kΩ.
- The chosen profile is not remembered: every boot starts at 5 V.
- About 4000 settings saves in the device's lifetime (see What is saved).
- Not certified. Compiling and hand-testing are not USB-IF or safety qualification.
| Button | Short press | Hold |
|---|---|---|
| Left / Right | previous / next group, or tab once in a group's tabs; on a framed value, change it; while scrolling, scroll | held, repeats wherever it changes a value or scrolls; moving between groups and tabs stays one step per press |
| OK | go into the group's tabs; on a tab, select, confirm, scroll or start (see each page) | 0.5 s: page action (cable query, full charger scan); on Overview, Energy and Graph, a fill sweeps left to right and resets the page once full (about 1 s); let go earlier to cancel |
| Back | up one level: cancel the edit or scroll, leave the tabs; from a group, back to the overview; on the overview, open the settings | – |
The pages sit in three groups: Monitor (Overview, Lines, Energy, Graph, Ripple), Trigger
(PD Profiles, PPS, AVS, QC 2.0, QC 3.0, SCP, FCP, AFC) and Info (PD Session, Charger, Cable,
System). The header shows the group's tabs as a strip, each in a colour no
other tab in its group has; a protocol family (PD, PPS and AVS; QC 2.0 and
QC 3.0; SCP and FCP) shares a hue in different tones, AFC has a blue of its
own, and the protocol's
cards and overview badge use too. The shown tab is named, the others fold to
thin bars. A dot per group sits on the right. The shown tab marks what
Left/Right move: a bar beside its name and lit dots for groups (the hint row
reads < > groups OK tabs), an underline for tabs, and a filled tab once the
page itself has them (choosing, editing or scrolling). A group comes back on
the tab it last showed.
Wherever a voltage, current or power has its own card or trace, it is yellow, cyan or green on every page; charge (Ah) is cyan and energy (Wh) green. Two exceptions: Lines gives each line its own colour, and the voltage lists (PD Profiles, QC 2.0, FCP, AFC) colour each voltage from cool to warm.
Holding Back and OK while plugging into a computer starts the bootloader instead (see Flashing).
The slider is read once at power-up. To change mode, move it and plug the meter in again.
- Sink (
PC13:0 SINK MODEon the PD session page). The meter is the PD sink: it negotiates with the charger itself, starting at 5 V, and you pick a fixed, PPS or AVS voltage. Whatever is plugged into the other side gets that voltage, so only raise it for a device or load that accepts it. - Passthrough (
PC13:1 PASSTHROUGH). The meter turns its own CC pull-downs off and sits between a charger and a device, which negotiate with each other as through a plain cable. The meter measures and logs their PD messages; it never sends, never acknowledges and never resets. Available tabs are Overview, Lines, Energy, Graph and Ripple in Monitor, and PD Sniff and System in Info. Settings remain available; the Trigger group is hidden.
- Plug straight into a charger (sink). The charger shows Rp on both CC pins, so the meter knows nothing is in between. The charger caps the offer at 3 A because no cable vouches for more; the charger page's full scan ends in the 5 A cable test to see the full offer.
- Through a cable (sink). The charger on either side, through a cable. A 5 A cable answers the charger itself, so the offer is already the full one. The cable page can read the cable's e-marker.
- Between a charger and a device (passthrough). The overview shows the power flowing, and the PD session page lists their messages.
- A port without PD (computer USB-A, or Type-C without PD). The meter
measures at 5 V; the PD session page reports no capabilities, and the
PD Profiles page shows
NO PD CHARGER.
Current is shown as a magnitude; chevrons in the overview's protocol strip point the way it flows (they follow the screen rotation).
| Page | Shows | Buttons |
|---|---|---|
| Overview | voltage, current, power; the highest of each since boot while a live page shows (MAX); protocol (USB, TYPE-C, PD 2.0, PD 3.0, PPS, AVS, QC 2.0, QC 3.0, FCP, FCP/SCP, SCP, AFC, DIVIDER, 1.2V DCP, BC1.2) with the CC pin and contract; flow chevrons; a heartbeat dot |
hold OK: reset MAX; Back: settings |
| Lines | D+, D-, CC1 and CC2 voltages | |
| Energy | charge (Ah), energy (Wh) and the time since the last reset; how the totals are kept | hold OK: reset the totals |
| Graph | power, voltage or current over the last 1, 2, 5 or 10 minutes; the latest second's and the window's highest voltage, current and power | OK, Left/Right choose power, voltage or current, OK, Left/Right change the window, OK done; Back closes; hold OK: clear the graph |
| Ripple | bus ripple waveform, smoothed peak-to-peak voltage, mean-removed RMS and nominal time per division | OK focuses the time per division; OK moves to the vertical scale, then run/hold; Left/Right change the one in < >; hold OK: restore the defaults; Back exits |
| PD Profiles | the charger's fixed profiles, ACTIVE on the one in force; with PD off for QC/SCP only LEGACY MODE |
OK, Left/Right to choose, OK requests it, Back cancels; in LEGACY MODE OK switches back to PD |
| PPS | the charger's PPS ranges, the set voltage and current limit, the live output; ACTIVE or NOT APPLIED; with PD off for QC/SCP only LEGACY MODE |
OK, Left/Right voltage (20 mV, 100 mV held), OK, current limit (50 mA, 250 mA held), OK requests; in LEGACY MODE OK switches back to PD |
| AVS | the charger's SPR AVS ranges, the set voltage and the current the meter asks for at it, the live output; ACTIVE or NOT APPLIED; with PD off for QC/SCP only LEGACY MODE |
OK, Left/Right voltage (100 mV, 500 mV held), OK requests; in LEGACY MODE OK switches back to PD |
| QC 2.0 | 5, 9, 12 and 20 V and OFF, the voltages the charger ignored greyed out, the status on its row; under a PD contract only PD MODE |
OK tests the charger, then opens at 5 V with the choice open (under a PD contract it first switches the charger out of PD); Left/Right choose, OK requests and closes the choice, Back closes it; the request stays in force on other screens until OFF |
| QC 3.0 | the step range, the set voltage, VBUS, D+ and D−; under a PD contract only PD MODE |
OK tests the charger, then starts continuous mode at 5 V (under a PD contract it first switches the charger out of PD); Left/Right move it by 0.2 V (repeats held); OK or Back closes it; the steps stay in force on other screens until OFF on QC 2.0 |
| SCP | identification, then the set voltage and current limit, the live output; ACTIVE, SETTING, STOPPING or FAILED |
OK tests adapter-type registers; after a detection with ratings, OK, Left/Right voltage (20 mV, 100 mV held), OK, current limit (50 mA, 250 mA held), OK applies; Back cancels an edit, then leaves the page with the output still in force; hold OK: stop the output, or rescan when none runs; PD must stop first |
| FCP | identification, then the voltages the charger lists and OFF, the status on the requested row (WAIT, SETTING, ACTIVE, STOPPING); under a PD contract only PD MODE |
OK tests the charger, then opens the choice at the voltage in force, else the first; Left/Right choose, OK requests and closes the choice, Back closes it; the request stays in force on other screens until OFF; hold OK: stop the output, or rescan when none runs; PD must stop first |
| AFC | identification, then 5 V, 9 V and OFF, the status on the requested row; under a PD contract only PD MODE |
as FCP |
| PD Session | sink: session state, CC levels, the source's offer and the port check (a dual-role device's sink PDOs and identity). Passthrough: CC pin, Rp level and the latest PD messages | OK to scroll; hold OK: port check (drops to fixed 5 V first, PD 3.0 only) |
| Charger | the offer (* = needs a 5 A cable), the charger's identity, maker and peak ratings, power status and source info, the battery of a power bank or a phone powering the meter, QC, SCP, FCP and AFC results |
OK to scroll; hold OK: full scan (Quick Charge, SCP, FCP and AFC identification, PD, EPR, and the 5 A cable test with the plug in the charger) |
| Cable | the cable's e-marker: a readable summary (type, speed, rating, length, alt modes, maker), identity, ratings, status and modes | OK to scroll; hold OK to read the e-marker (drops to fixed 5 V first) |
| System | serial number, firmware version, estimated meter temperature, I2C bus state and counters, frame and button timing, stack use, LAST RESET: cause |
OK to scroll |
| Settings | BRIGHTNESS (5 levels, 60% at first), ROTATION (AUTO follows the tilt sensor, NORMAL, FLIPPED), ENERGY MEMORY, TIMER and CALIBRATION |
Left/Right row, OK change it, Left/Right value, OK or Back done |
The selector pages only show the offer until a sink session has one. A profile is requested only after the final OK; Left/Right alone just preview.
The heartbeat dot blinks while the meter runs. Red means the sensor bus is
closed: readings stop (--.--), and the System page says why. That happens
after a bus error, or after a failed PD session left the PD controller in an
unknown state. A port without PD does not close it.
Brightness, rotation, the energy-memory interval, timer mode and calibration
are saved to flash once you finish changing them, and come back at the next
power-up, as does the mode the meter restarts the
charger into (full scan, cable test, Quick Charge). The chosen profile is not:
every boot starts at 5 V. MAX values live until reset or power-off.
Saving appends an 8-byte record to the meter's original settings area and never erases settings sectors. Each 8 KiB sector holds 1023 records; up to four are available for new settings/log allocations (about 4000 settings saves without diagnostic logs). A calibration takes three records of its own, and a sector newly taken into use starts with them. Older builds skip these records, so going back to one keeps the other settings. Existing records from older builds are still read. After this area fills, settings keep working until power-off but are no longer saved.
Energy memory defaults to Off: Ah/Wh and the time reset at every restart and no totals are written. Choose 5s, 10s, 30s or 60s to restore the latest checkpoint and continue counting across restarts. Checkpoints are attempted at every interval. Changing an enabled interval or enabling memory also checkpoints current totals; resetting on the Energy screen clears the counters and the time and checkpoints the reset when memory is enabled. Checkpoints from earlier builds, which kept no time, are carried over once at boot with the time at zero. Turning memory off leaves current totals on screen, but the next boot starts at zero. Re-enabling it uses the current run, not an old checkpoint.
Energy uses a separate rotating two-sector journal, spreading erase wear and
keeping the previous complete checkpoint during rollover. Power loss can lose
usage since the last successful save; interrupted writes are ignored on boot.
On boot, before protocol tasks start, the firmware automatically migrates old
project diagnostic logs found in the reserved energy pair (0x78000, 0x7a000).
It discards only those logs, commits migration intent before erasing, and resumes
an interrupted migration on a later boot. Settings, logs outside that pair,
firmware and the bootloader are not cleared. This one-time migration may also
run with Energy memory Off; it is not a recurring boot erase. Blank or already
initialized pairs need no cleanup. Unknown data is never treated as unused.
On the Energy screen, flash taken means the reserved sectors contain unrecognized data or
settings this journal cannot claim, and save failed means a write or erase failed.
In either case totals are RAM-only and remain usable until power-off. Writes
stop after a flash error for that boot. Settings also show SETTINGS AREA FULL
or SETTINGS WRITE FAILED instead of silently promising that a failed change
was saved. On System, the read-only FLASH STORAGE section shows sector
headers and erased-word counts (FREE 0800 means an entirely blank sector).
ERR reports the last failing operation this boot: 01 write-mode error, 02
window protection, 04 size/alignment, 08 read-back mismatch, 20 bus collision,
40 rejected software check, or 80 verification failure; flags may combine.
AT is that operation's start address. No error flag alone authorizes an erase.
Neither the bootloader nor its boot-swap sector is touched.
Shorter intervals wear flash faster. Each energy sector holds 136 checkpoints. At the datasheet's minimum 10,000 erase cycles, two-sector rotation gives roughly 2.72 million checkpoints: about 157 days at 5s or 5 years at 60s of continuous running. These are endurance estimates, not guarantees. Runtime sector erase pauses execution for up to roughly 20 ms; live PD timing needs hardware validation before treating an energy-memory build as qualified.
Every screen, group by group in Left/Right order. Each one gives a
screenshot, what the screen is for, each field it can show, then its hint
row (the bottom line). - or --.-- in a field means "not known yet".
Hexadecimal values are raw register or message contents, shown for
diagnosis.
While Left/Right move between groups, every hint row reads
< > groups OK tabs. The scrolling screens (PD Session, Charger, Cable,
System, PD Sniff) share one hint row: < > tabs OK scroll, then
< > scroll OK done while scrolling, or < > tabs BACK groups when
everything fits on one screen. Charger and Cable add their hold action,
hold OK scan and hold OK read, which replaces BACK groups when
everything fits.
Every hint row lists its buttons in the same order: Left/Right first, then
OK, then a hold or Back, then any note, so on a tab it always starts with
< > tabs.
The screenshots are drawn on a computer by the firmware's own page code, so they match what the current firmware draws. Recorded meter values are used where available; AFC and Calibration use example values, and System's serial number and temperature are illustrative. A screenshot demonstrates layout, not hardware validation. To draw them again:
cargo run -p firmware-core --example screens --locked -- picturesThis is the Overview screen (tab OVERVIEW in Monitor): the live bus
readings in outlined cards, each named on its top edge, and the protocol in
use in the PROTOCOL strip along the bottom. The meter starts on it.
VOLTAGE: bus voltage, in volts.--.--until the first reading, or while the sensor bus is closed.CURRENT: current in amperes, as a magnitude, whichever way it flows.POWER: voltage × current, in watts.MAX: the highest voltage, current and power seen since power-up or the last reset, counted while the overview, the graph or a Trigger page shows (the pages with live readings). Hold OK: the card fills from left to right and the values reset once it is full; let go earlier to keep them.- Protocol (left in the
PROTOCOLstrip, which takes its colour): the first of these that applies.QC 2.0/QC 3.0: this meter's Quick Charge request, while the charger follows it. Status: the request (9V) or the output the steps set (7.40V).PD: the charger sent an offer, no contract known yet.PD 2.0/PD 3.0: fixed PD contract and its PD revision.PPS: a PPS contract.AVS: an SPR AVS contract.QC 2.0/QC 3.0again: Quick Charge another device drives, read from D+/D-. A raised request counts once the output moved past halfway to it; continuous mode showscontinuous.FCP/SCP/FCP/SCP: single-wire data another device sends on D-. The meter decodes each transaction from D-'s edges, checking its framing, parity and CRC. A register only one protocol uses names it (FCPorSCP), and an accepted voltage write shows the output it asked for (9V) while VBUS is near it; otherwise the status isD- data.FCP/SCPmeans only the identification registers both share were seen, or the traffic was only suspected from line-voltage samples. Decoding stops while this meter drives D+/D- itself and during each line scan, which waits for a gap between transactions. What was decoded stays until D+ goes idle. SCP identification was seen from a real tablet and charger; the requested voltage is not yet checked on hardware.SCP: this meter's read-only SCP check verified the charger's type registers and VBUS is at the default 5 V (detected, 5V). It is evidence of support, not an SCP output contract. Once this meter's SCP output is applied and followed,SCPshows its setpoint and current limit instead (e.g.9.00V 2.00A), and once this meter's FCP or AFC request is followed,FCPorAFCshows its voltage (e.g.9V).TYPE-C: Type-C current advertisement without PD (1.5 A or 3 A).DIVIDER: a port telling its current by fixed D+/D- voltages (TI TPS2514 datasheet, section 8.3.3): D+ 2 V and D- 2.7 V for a 5 W adapter (5V 1.00A), 2.7 V and 2 V for 10 W (5V 2.00A), 2.7 V on both for 12 W (5V 2.40A).1.2V DCP: 1.2 V on both lines, which some tablet chargers use (section 8.3.4); no rating is published.BC1.2: a dedicated charging port with D+ shorted to D- (5V shorted). Only the Quick Charge test can see the short, so this shows after it ran.USB: plain USB power (Type-C default current, or no Type-C at all).NONE: no source identified yet.
- Status text after the protocol, in white: the CC pin in use (
CC1orCC2), then one ofno source,5V default,5V 1.50A,5V 3.00A,offer, 5V, the contract (for example9V 3.00A), or the Quick Charge and port values above. - Chevrons
< < <or> > >(in the strip): the direction current flows, drawn above a small threshold. One is lit at a time, stepping the way the current flows every half second. They follow the screen rotation. - Heartbeat dot (right end of the strip): blinks while the meter runs; red when the sensor bus is closed (see the System screen).
- Hint row:
< > tabs hold OK reset.
This is the Lines screen (tab LINES in Monitor): the voltages on the
USB data and configuration lines, read by the MCU's own ADC against its
internal reference, independently of the bus sensor and the PD controller.
The lines are sampled while Lines, Overview, Ripple, System or a Quick Charge,
SCP, FCP or AFC page shows, or while a legacy-protocol request runs. Only
System scans include the meter-temperature input.
D+/D-: the USB 2.0 data lines, in volts. Chargers that identify themselves on these lines (BC 1.2, Apple and similar dividers) show their levels here.CC1/CC2: the Type-C configuration channels, in volts. The pin in use carries the Type-C pull-up/pull-down level; a cable's VCONN shows on the other one. In sink mode that level is a bit over half of what another tester shows (see Limitations).-.--: no reading yet, or the last ADC scan failed.- Hint row:
< > tabs approximate. The internal reference was measured on one unit, and another unit's may differ by a few percent (see Limitations).
The Energy screen (tab ENERGY in Monitor, after Lines) shows, in three
outlined cards, CHARGE in Ah and ENERGY in Wh, with three decimals, and
TIME since the last reset (h:mm:ss). It counts current magnitude in either direction, sampling
voltage/current every nominal 100 ms regardless of the shown page. Failed
samples and gaps over one second are not extrapolated. By default, time counts
while the meter runs, including through missing readings. The Settings TIMER
option can instead count only active time: intervals with readings at both ends
above 0.2 W in either direction, matching the stock firmware's power threshold.
Missing readings and gaps over one second do not count in active mode. Counters
and time continue from saved totals only when energy memory is enabled; changing
timer mode does not reset the accumulated time.
The hint row ends with how the totals are kept: RAM only, save 5s (the
checkpoint interval), flash taken or save failed, for example
< > tabs hold OK reset save 5s. To start fresh, hold OK: the cards fill
from left to right and reset once full.
The Graph screen (tab GRAPH in Monitor, after Energy) plots power
(at first, green), voltage (yellow) or current (cyan) over the last
1 MIN, 2 MIN (at first), 5 MIN or 10 MIN, newest on the right. Each second is the average of its readings; where a window has
more seconds than the plot has pixels, a column shows the highest second it
covers, so a short peak stays visible.
NOW/MAX(a card above the plot): for voltage, current and power, the last full second's value, then the highest within the window, each on its own, e.g.9.01/9.10V 2.98/3.02A 26.85/27.40W.- Scale: from zero to a round number at least 10% above the plotted
quantity's
MAX(1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6 or 8 times a power of ten: 22 W shows on a25Wscale, 9 V on10V), named in grey at the top left of the plot. - Trace and window (top right of the plot):
POWER 2 MIN, the trace in its colour. OK opens the trace (< POWER >): Left/Right choose power, voltage or current. OK moves to the window (< 2 MIN >in cyan): Left/Right change it. OK again, or Back at either step, closes. Both last until a restart. - A second without a reading leaves a gap.
- Reset: hold OK and the
NOW/MAXcard fills from left to right; once full, the history clears and the plot starts over. Let go earlier to keep it. - Hint row:
< > tabs OK choose hold OK reset, then< > trace OK timeand< > time OK done.
The history is kept in RAM only (ten minutes, about 7 KB): it costs no flash writes, and a restart clears it and comes back on the overview.
The Ripple screen (tab RIPPLE in Monitor, after Graph) captures fast
bus-voltage variations. Statistics cover 1024 samples; the plot shows at
most 640, so peaks can lie outside the visible trace.
mV p-p: highest minus lowest sample, smoothed over the last 30 captures (about 3 s): 65% their average, 35% their maximum, a blend recovered from the stock firmware. It restarts when the timebase changes or the capture resumes.RMS: ripple RMS with the capture's mean removed, not total bus RMS. An oscilloscope's RMS can include a nonzero mean and is not always directly comparable.V/A: live bus voltage and signed current, including during hold.AUTO/LOCK …mV/div: automatic (default) or fixed vertical scale, 2–500 mV/div.~50us/div: nominal microseconds per division in scope steps of 20, 50, 100, 200 and 500, clock-derived rather than measured or calibrated (the sampling lands within 1% of each step). 20 and 50 us/div show fewer samples at the top rate (about 0.9 MS/s at a 30 MHz ADC clock, 1.1 MS/s at 37.5 MHz); the slower steps sample more slowly, down to about 160 kS/s at 500 us/div. Ripple above half the sample rate aliases: the fastest steps can represent up to about 450 kHz, which covers typical charger switching frequencies (often around 65–130 kHz) but not the fastest chargers. The analog input's bandwidth is not characterized.- Spectrum (purple, behind the trace): the whole capture's frequency
content, from 0 at the left to half the sample rate at the right, heights
relative to the strongest frequency (not a voltage scale).
1 2 3, at the foot of their bars, mark the three strongest peaks; the top of the plot lists each one's frequency in kHz, strongest first. Frequencies come from the nominal sample rate, interpolated between FFT bins; at slow timebases higher ripple folds back (aliases) to a lower frequency, so use 20 or 50 us/div to read switching frequencies. - Status:
Tmeans a rising trigger was found, with hysteresis against noise.CLIPPEDmeans an ADC rail was reached: amplitude is a lower bound.OFF SCALEmeans the scale cuts off peaks: a fixed one too small, or more than 1 V from the mean even at 500 mV/div.NO REFmeans ADC counts replace voltage scaling.
OK first focuses the time per division without freezing. Each further
OK moves to the next setting: time per division, vertical scale, then
RUN/HOLD. The setting Left/Right change is yellow, between < >.
Holding OK restores 50 us/div, auto scale and run; Back returns to
tab navigation.
HOLD freezes the trace, spectrum, statistics and voltage reference, but not
bus V/A. A different vertical scale redraws the held capture; a different
time per division starts a live capture, since the held one was taken at the
old rate. A hold lasts until another tab is shown; coming back starts live.
Ripple readings are not calibrated: accuracy under load, at other ripple frequencies and the actual sampling cadence are not characterized.
This is the PD Profiles screen (tab PD PROFILES in Trigger): the
charger's fixed profiles, to request one.
- Each row: voltage, the charger's maximum current at it, and that power in watts. The voltage is coloured from cool (low) to warm (high).
ACTIVE: the profile in force now.- Frame: the profile being previewed while choosing.
NO PD CHARGER/plug in a PD source: the charger offered no fixed profiles.LEGACY MODE/PD is off for QC / SCP: this boot keeps PD silent for legacy protocols, so there is no offer.- Scrollbar: on the right edge when there are more than five profiles (an EPR charger's 28 V adds one); choosing scrolls the list.
- Hint row:
< > tabs OK select a profile(< > tabs OK select/scrollwith the scrollbar), then while choosing< > choose OK request BACK cancel. Before the charger's offer arrives it reads< > tabs waiting for the charger; inLEGACY MODE,< > tabs OK switch back to PD. While EPR is being entered or left, or after it failed, the PD screens show its state here instead:EPR: entering mode,EPR: returning to SPR,EPR: cable not capable,EPR: VCONN failed,EPR: RDO bit missing,EPR: source unavailable,EPR: source PDO bit,EPR: unknown failure,EPR: timeout / bad replyorEPR: line busy, retry OK.
This is the PPS screen (tab PPS in Trigger): the charger's
programmable ranges, to request a voltage and current limit.
PPS RANGE: each PPS range the charger offers, a line each (the card takes one or two), for example3.30-21.00V 5.00A: the voltage range and the most current at any voltage in it. A PPS range states no power, so none is shown; multiplying the maxima would overstate a power-limited charger.SET VOLTAGE: the voltage to request, in 20 mV steps (100 mV while held), from the bottom of the charger's range (often 3.3 V) to its top. The arrows show it is the value Left/Right change.CURRENT LIMIT: the current limit to request, in 50 mA steps (250 mA while held).OUTPUT: the live voltage and current, then on the right the state:ACTIVE(this setting is the contract in force),NOT APPLIED(set but not requested yet), or empty.NO PPS/this charger offers no PPS range: nothing to set.LEGACY MODE: as on the PD Profiles screen.- Hint row:
< > tabs OK adjust PPS,< > volts OK next: current,< > amps OK request, or< > tabs waiting for the charger; inLEGACY MODE,< > tabs OK switch back to PD.
This is the AVS screen (tab AVS in Trigger): the charger's
adjustable voltage ranges (USB PD 3.2), to request a voltage. Unlike PPS, the
charger does not limit the current: the meter asks for the most the range
allows at the set voltage. SPR AVS runs from 9 V, at most 100 W; EPR AVS from
15 V up to 30 V, at most 150 W and 5 A, and needs a real EPR cable.
AVS RANGE: each AVS range, a line each, for example9.00-20.00V 3.00A / 2.25A: the SPR current up to 15 V, then above 15 V (only on a range that reaches 20 V);15.00-30.00V 140W EPR: an EPR range capped at 30 V and its power, which the current at each voltage follows.SET VOLTAGE: the voltage to request, in 100 mV steps (500 mV while held), framed with arrows while Left/Right change it.CURRENT: the current the request asks for at that voltage.OUTPUT: as on the PPS screen.NO AVS/this charger offers no AVS range: nothing to set.LEGACY MODE: as on the PD Profiles screen.- Hint row:
< > tabs OK adjust AVS,< > volts OK request, or< > tabs waiting for the charger; inLEGACY MODE,< > tabs OK switch back to PD.
This is the QC 2.0 screen (tab QC 2.0 in Trigger): Quick Charge 2.0
fixed voltages, to request one. It is laid out as the PD Profiles screen;
Quick Charge explains the switch out of PD, the test and
the requests.
- Rows: 5, 9, 12 and 20 V, then
OFF(plain USB). Before the test 20 V readsClass B only; after it a voltage the charger ignored is greyed out withcharger ignored it(needs Class Bon 20 V) and cannot be chosen. The choice is framed. The charger page lists the test's full result. - Status pill on the row it concerns:
WAIT(handshake),SETTING(waiting for VBUS),ACTIVE,IGNORED,NO DCPorNO QC. PD MODE/the charger ignores QC under PD: a PD contract holds the charger.TESTING THE CHARGER: the test runs, with the step it is on (Quick Charge handshake,asking for 9V,QC 3.0 continuous mode,QC 3.0 steps +0.40V,back to 5V). It ends inNO CHARGING PORT/D+ and D- are not shortedorNO QUICK CHARGE/D- stayed highwhen the charger has no Quick Charge.- Hint row:
< > tabs OK choose a voltage, then while choosing< > choose OK request BACK cancel, and< > tabs OK changeonce a request runs. Until the charger follows it:< > tabs handshake,< > tabs waiting for VBUS,< > tabs OK change output unchanged,< > tabs OK change no D+ D- shortor< > tabs OK change D- stayed high. Before the test< > tabs OK test charger, up to 20V, during itBACK stop up to 20V on the output(BACKonce it failed); inPD MODE,< > tabs OK switch to QC, up to 20V.
This is the QC 3.0 screen (tab QC 3.0 in Trigger): Quick Charge 3.0
continuous mode, to set the output in 0.2 V steps. It is laid out as the PPS
screen; see Quick Charge.
STEPS: the step range the test found, else3.6-12V by 0.2V Class Aand3.6-20V by 0.2V Class B.SET VOLTAGE: the output the steps aim for, framed with arrows while Left/Right move it.VBUS: the live bus voltage.LINES: D+ and D- as measured, to check the driven levels, then on the right the state:WAIT,STEPPING,ACTIVE(the steps reached the set voltage),NO DCPorNO QC.PD MODEandTESTING THE CHARGER: as on the QC 2.0 screen.NO QC 3.0/the charger ignored the steps: the test found no steps.- Hint row:
< > tabs OK start at 5V, then< > 0.2V OK donewhile adjusting, and< > tabs OK adjustonce the steps run; the handshake, test andPD MODEhints as on the QC 2.0 screen, and< > tabsafterNO QC 3.0.
This is the SCP screen (tab SCP in Trigger): SuperCharge, to identify
the charger and set its output voltage and current limit. It is laid out as
the PPS screen; SCP explains the test and the output control.
SCP RANGE: the voltage range and highest current the charger reports, and its rated power when it reports one, for example5.50-11.00V 3.00A 33W.SET VOLTAGEandCURRENT LIMIT: the output to request, in the charger's own steps, framed with arrows while Left/Right change them.OUTPUT: the live output, with its state on the right:ENTERING,SETTING(waiting for VBUS),ACTIVE,STOPPINGorFAILED. On a failure the reason replaces the reading.MAX VOLTAGE,MAX CURRENTandMODE(LVC,HVCorLVC + HVC, withDETECTED): shown instead when the charger is found but its ratings are incomplete (ratings not reported), so no output can be set.TESTING SCP/adapter identification: the test runs.SCP DETECTED,NO SCP,SCP NOT VERIFIEDorSCP NOT TESTED: the result, with the reason below it (for exampleTYPE NOT PROGRAMMABLE), orno output requested.PD MODE/PD must stop before SCP detection: a PD contract holds the charger.- Hint row:
< > tabs OK test SCP, andBACK stopwhile it runs. Once the ratings are read,< > tabs OK adjust HOLD OK rescan, then< > volts OK next: currentand< > amps OK requestwhile editing, and< > tabs OK adjust HOLD OK stopwhile an output runs; without complete ratings,< > tabs OK rescan SCP. InPD MODE,< > tabs OK switch to SCP detection.
This is the FCP screen (tab FCP in Trigger): the fixed voltages a Fast
Charge Protocol charger lists, to request one. It is laid out as the QC 2.0
screen; FCP explains the test and the requests.
- Rows: each voltage the charger lists, for example
5.20V,9Vand12V, the highest with the charger's rated power (18W rated), thenOFF(plain USB). The choice is framed. - Status pill on the requested row:
WAIT,SETTING(waiting for VBUS),ACTIVE,STOPPINGorFAILED. TESTING FCP/adapter identification: the test runs.NO FCP,FCP NOT VERIFIEDorFCP NOT TESTED: no voltages to show yet, with the reason below it (for exampleNO FCP VOLTAGES), orno output requested.PD MODE/PD must stop before FCP detection: a PD contract holds the charger.- Hint row:
< > tabs OK test FCP, andBACK stopwhile it runs. Once the voltages are read,< > tabs OK choose HOLD OK rescan, then< > choose OK request BACK cancelwhile choosing, and< > tabs OK change HOLD OK stopwhile a request runs. A failed request shows its reason here instead. InPD MODE,< > tabs OK switch to FCP detection.
This is the AFC screen (tab AFC in Trigger): Samsung Adaptive Fast
Charging's 5 V and 9 V, laid out as the FCP screen; AFC explains the
test and the requests. The picture is a layout fixture, not a photo.
- Rows:
5V,9V, thenOFF(plain USB). These are request choices, not voltage ratings discovered by the test. - Status pill, test,
PD MODEand hint rows: as on FCP, withAFCin place ofFCP(TESTING AFC,NO AFC,AFC NOT VERIFIED,AFC NOT TESTED,< > tabs OK test AFC).
This is the PD Session screen (tab PD SESSION in Info): the meter's
own PD negotiation. It scrolls (OK) through the session, startup and port
check sections.
Session section
PD SPR 05V C1 TX ON: the session kind (SPRfixed,PPS,AVS), the target voltage, the CC pin, and the transmitter state:TX ON(contract live),TX OFF(finished and verified off) orTX UNKNOWN.REQ:05.00V 3.0A N6 R3 I5: the last request: voltage, current,Nhow many objects the charger offered,Rthe charger's PD revision (2 or 3),Ithe message ID of the request (0–7).TRY ACK ACC RDY: request written, acknowledged with GoodCRC (G: GoodCRC seen without the send-done flag),Acceptreceived,PS_RDYreceived.Yyes,-not yet.MS: AK AC RD: milliseconds for each step: the request sent to its GoodCRC, GoodCRC toAccept, andAccepttoPS_RDY.VBUS:05.13V MEASURED: the live bus voltage. Before a live reading the row isV:G--.-- RD--.-- RT--.--: VBUS before the request, atPS_RDY, and after the session ended.- Row 6, one of:
ERR:---- A:---- R:----: the error code (table below), the I2C address and the register involved.CHARGER BUSY: OVERRIDDEN: the charger kept its "wait" signal on a quiet line, and the meter sent anyway (see the safety notes).CHARGER BLOCKS CHANGES: the charger's signal did not allow sending.TX LOST TO CHARGER MSG: a charger message arrived first, so the meter's message was dropped unsent.CABLE QUERY - 5V ONLY, or a cable result such asCABLE:P 20V 5A SPD:2(Ppassive /Aactive, maximum voltage, current,*= current assumed,EPRwhen the cable is EPR capable,SPD/Sspeed code).
- Row 7, one of:
SEL:P07.02 05.00A [V] OK: the selection being prepared (Pfor PPS,Afor AVS;[V]or[I]for the value being changed).SEL:09V: the fixed profile being prepared.HOLD BACK TO STOP,POST S1:---- C3:----(controller registers after the session),RESTORE NOT VERIFIED,VCONN STATE UNVERIFIED,VALUE:----(an unexpected register value),WAIT - NO RETRY(a cable query is running) or a cableVID/PID.
- Last row, the session state:
05V CONTRACT LIVE/PPS07.02V 05.00A LIVE(AVS…likewise): a contract is in force.SPR NEGOTIATING/PPS NEGOTIATING/AVS NEGOTIATING: asking for it.05V SEEN ROK TX OFF: the session finished cleanly.NO CAPS / HALTED/NO CAPS RESTORED: the charger sent no offer (a port without PD).WAIT CC TEST,MEAS RX POWER,RX LISTEN TX OFF,CAPS RESTORED TX OFF: startup steps.SKIP BUS LATCHED: the session never started; the bus was closed.QUICK CHARGE PD OFF: PD stays off for a Quick Charge boot.- The
EPR: …states listed under the PD Profiles hint row, while EPR mode is entered or left, or after it failed. FAIL REG:----,SKIP REG:----,DIFF REG:----: stopped on a register error, an unexpected start state, or a value that did not read back.
Startup section
CC1:-- CC2:--: both CC pins' status at startup (the PD chip's STATUS0; its low two bits are the CC level). Because of the meter's stronger pull-down (see Limitations) the level reads one step low:01is a default or 1.5 A port,02a 3 A port.ONE CC WITH RP: a normal attach through a cable.BOTH RP: VCONN ON CC1/CC2,BOTH RP: TRAFFIC ON CC1/CC2,BOTH RP: LEVEL ON CC1/CC2orBOTH RP: NO SINGLE LINE: the meter's plug sits in the charger, and how it picked the line to talk on.LEVEL: the charger's packets arrived on both pins, so either works and the meter took the one with the higher Rp level (tested with a power bank, in both orientations);NO SINGLE LINE: it could not pick one and did not start.CC1 SOP:--- CABLE:---andCC2 …: messages heard on each pin for the charger and for a cable.
Port check (PD3 only)
The port check reads what a phone or other dual-role device accepts as input. Plug the device in where the charger normally goes: it sees the meter's sink pull-down, switches to supplying power (as when it charges earbuds), powers the meter and offers it PD. Hold OK on PD Session: from another contract the meter first requests fixed 5 V. A source that advertises dual-role power is then asked for its sink PDOs, followed by SOP Discover Identity; one without that flag is asked only for identity. No power or data role swap, VCONN change or cable test is performed, and a device that only charges cannot be checked: it never powers the meter.
Scroll to PORT CHECK for the outcomes, then SINK PDOS (ACCEPTS),
PDO 1 FLAGS, DISCOVER IDENTITY and UFP VDO:
PORT CHECK:PARTNER:DRPorPARTNER:SOURCE ONLY(from the dual-role power flag), then theSINK PDOS:andIDENTITY:outcomes, orHOLD OK: SCAN AT 5Vbefore a scan. A PD 2.0 partner showsSCAN:PD2 N/Ainstead: it cannot be scanned, so holding OK does nothing.PDO 1 FLAGSlists the capability bits set in the first source PDO (shown before a scan too) and, after a scan, the first sink PDO:DRPdual-role power,USB SUSPEND,UNCONSTRAINEDpower,USB DATAcommunication capable,DRDdual-role data,UNCHUNKEDextended messages,EPRcapable andHIGHER CAP(the device works better above 5 V), thenFRSwith the current a fast role swap needs (NONEwhen unsupported).NONEmeans no bit is set.DISCOVER IDENTITY: VID, PID, bcdDevice, XID, the UFP and DFP product types, USB device and host,MODAL(the device offers alternate modes as a UFP) andCONN(receptacle or plug).UFP VDO, when a known UFP v1.2 or v1.3 layout was received: the highest USB speed, USB 2.0, Billboard, USB 3.2 and USB4 device support, andALT MODES:TBT3,RECONFIG(modes that reconfigure the connector's signals, such as DisplayPort) andNO RECONFIG(modes that do not), with the VBUS and VCONN needs of those modes.
The device's own offer to the meter is on the Charger page. Watts in parentheses are calculated from each PDO (the top voltage for variable and PPS ranges), not a measured charging rate. QC, AFC and SCP input support cannot be inferred from PD results. The XID is not proof of certification.
NOT DRP (sink PDOs not asked), NAK, BUSY, NO REPLY, NOT SUPPORTED,
BLOCKED and RESET are distinct outcomes. NO REPLY for identity means the
request was acknowledged but no answer arrived within 50 ms, the longest the
specification lets the meter wait.
BLOCKED means the request was never sent, for example with VBUS outside
4.75–5.5 V. There is no automatic retry; a later hold starts a new scan. Power
changes and cable inspection wait while the scan runs. The scan is disabled in
passthrough and the 5 A cable-test boot.
ERR codes (hexadecimal):
| Code | Meaning |
|---|---|
0001 |
stopped on an I2C error |
0002 |
wrong CC orientation or input voltage; not started |
0003 |
receive buffer not empty at a boundary |
0004 |
Hard Reset received |
0005 |
PD controller fault |
0006 |
unexpected transmission |
0007 |
receive buffer overflow |
0008 |
malformed message |
0009 |
unexpected acknowledgement |
000A |
request refused by the meter's checks |
000B |
message queue full |
000C |
polling budget used up |
000D |
transmit timeout (row 6 then shows TO S1 IA N H) |
000E |
could not complete the session |
000F |
protocol error from the charger |
0010 |
PPS keep-alive deadline missed |
0011 |
Hard Reset needed |
0012 |
message not acknowledged |
0013 |
VBUS did not return after a Hard Reset |
0014 |
VBUS problem during a BIST test |
0020 |
session stopped |
0021 |
unsupported controller |
0022 |
charger offer failed the safety checks |
0023 |
charger protocol error |
0024 |
received message discarded |
0025 |
Hard Reset received |
0026 |
transmit failed |
0027 |
request declined |
0028 |
no offer from the charger (port without PD) |
0029 |
sending blocked |
002A |
PD engine error |
002B |
session ended without a contract |
002C |
Hard Reset sent |
This is the Charger screen (tab CHARGER in Info): what the charger says
about itself, plus QC tests and SCP, FCP and AFC identification. The PD
parts are the charger's claims; legacy results come from active probes. It
scrolls (OK) through the parts; a long offer takes two screens.
CAPABILITIES
- One row per offered object, numbered by its position:
FIX 9.00V 3.00A: a fixed voltage.PPS 3.3-21.0V 5.00A: a PPS range.AVS 9-20V 3.00A/2.25A: an SPR AVS range. Its object has no voltage field, only a current for 9-15 V and one for 15-20 V, which is zero on a 15 V charger:AVS 9-15V 3.00A. One current means both ranges share it (AVS 9-20V 3.00A).EAVS 15.0-48.0V 140W: an EPR AVS range. Selectable EPR AVS ranges are capped at 30 V; the partner page can still show the full advertised range.RAW xxxxxxxx: an object type the meter does not decode.
*after a row: offered at that current only with a 5 A cable. Then the note* ONLY WITH 5A CABLE.- Notes:
HOLD OK: FULL RESCAN/QC/SCP/FCP/AFC; RESTARTS(ALL + 5A TEST; RESTARTSwith the plug in the charger): hold OK for the full scan.- The EPR (28 V and up) request:
ASKING CHARGER,NO ANSWER, HOLD OK AGAIN,LINE BUSY, HOLD OK AGAIN, or in the 5 A cable testHOLD OK FOR ALL. BACK ENDS 5A CABLE TEST: the test is running. The heading then also names the reset cause (POWERis expected).5A TEST DID NOT START/HOLD OK TO TRY AGAIN.- The
EPR: …states listed under the PD Profiles hint row. NO PD SESSION,NO OFFER YET.
KEEP:---- GAP:----MS(last row, in EPR mode): how many keep-alives the meter sent, and the longest gap between two PD messages it saw, in ms.
QUICK CHARGE 2.0 and QUICK CHARGE 3.0
Quick Charge reports nothing itself, so these show the result of the full scan or the last Quick Charge test, measured on VBUS:
- 2.0: the class (
CLASS A, UP TO 12VorCLASS B, UP TO 20V), thenYESorNOfor each fixed voltage,5Vto20V.NOT SUPPORTEDwhen the charger took no 9 V. - 3.0:
SUPPORTEDwithRANGE 3.6-12V(up to 20 V for Class B) andSTEP 0.2V, orNOT SUPPORTED/NO 0.2V STEPS.
A failed handshake shows one QUICK CHARGE section with NOT A CHARGING PORT or NO QUICK CHARGE. Before any result it shows NOT SCANNED YET
with HOLD OK: FULL RESCAN and (QC/SCP/FCP/AFC AND PD), or without a PD
contract NOT TESTED YET with HOLD OK: FULL SCAN and (QC/SCP/FCP/AFC),
which runs QC then read-only SCP, FCP and AFC identification and
returns to Charger info on success or failure, without opening QC controls.
SUPERCHARGE (SCP)
Always present. SCP DETECTED requires
programmable-adapter type registers with checked framing, parity and CRC,
and a measured 5 V output. Reported low/high-voltage modes are capabilities,
not a negotiated output or current allowance. NO SCP means the charger
showed it has none: no reaction to the entry handshake, no answer to the
first read (NO DIGITAL RESPONSE), or a type that is not programmable
(TYPE NOT PROGRAMMABLE). SCP NOT VERIFIED means the test itself went
wrong (a damaged reply, timing, or a VBUS or line check); it includes the
live failure reason and does not mean unsupported. NOT TESTED YET
means no result. The compact result survives scan restarts alongside QC,
but a new normal attachment does not inherit a previous charger's SCP proof.
FAST CHARGE (FCP)
Always present, after SCP. FCP DETECTED lists the charger's voltages
(VOUT: 5.2 / 9.0 / 12.0V) and MAX POWER when it reports one; after the
full scan's restart only the highest voltage survives (VOUT: UP TO 12.0V). NO FCP, FCP NOT VERIFIED and NOT TESTED YET mean what they
do for SCP. The result is kept in its own flash record beside the settings
and carried through the scan like SCP's.
SAMSUNG AFC
Always present, after FCP. AFC DETECTED and 5V EXCHANGE CHECKED mean
that the complete ping sequence for the test's 5 V request succeeded.
REQUESTS: 5.0V / 9.0V lists the available controls, not discovered charger
ratings; 9 V is only verified after an explicit request and VBUS measurement.
The reference driver skips the response data, so no reply byte or current
rating is inferred. NO AFC, AFC NOT VERIFIED and NOT TESTED YET mean
what they do for SCP. The result is kept in its own flash record, as FCP's is.
IDENTITY
IDENTITY, PEAKS AND MAKER and POWER STATUS are the charger's answers
to PD queries, so a charger that made no PD offer shows CHARGER MUST SUPPORT PD in each.
REV:3.1 V1.8: the charger's PD revision and version.EXT CAPS:the outcome of asking for its extended capabilities.VID:---- PID:----: USB vendor and product ID.XID:-------- FW:-- HW:--: certification ID, firmware and hardware version.PDP SPR:---W EPR:---W: rated power, standard and extended range.HOLD:---MS LOAD:---: hold-up time in ms and load step rate.COMPL:the safety standards it claims:LPS,PS1,PS2orNONE.
PEAKS AND MAKER
P1–P3 OVL:--- MS:---- D:--: peak current capability: overload %, period in ms, duty cycle %;*= VBUS may droop.TOUCH:LOW,GND,PE, and the touch temperature classT:TS1,T:TS2orT:60950.IN:power sources:EXT,UNC,BATorNONE;BATT:-/-fixed batteries and hot-swap slots.MFR VID:---- PID:----and the maker's name string.
POWER STATUS
SRC INFO:thenGUARANTEEDorMANAGEDwithMAX:---W.NOW:---W REPORTED:---W: present and reported power.GUAR:---W MAX2:---W DPS-: second port's guaranteed and maximum power, and whether it is a dual-power source.STATUS:thenT:internal temperature (N/A,<2C, or°C) andN:how many status answers so far.IN:DC,ACorINT, then any active protections:OCP,OTP,OVP,CL.TEMP:NORMAL,WARNING,OVERTEMPorN/A;LIM:CPXETpower limited by Cable, other Ports, eXternal power, Events, Temperature.
BATTERY, only when the charger reports a battery (a power bank, or a
phone powering the meter): its first battery, as the charger describes it.
CAPS:the outcome of asking for its capabilities, thenVID:---- PID:----,DESIGN:the design capacity andFULL:the last full-charge capacity, in Wh (UNKNOWN, orNONEwith no battery in place).STATUS:the outcome of asking for its status, thenCHARGE:the energy it holds now, in Wh, andCHARGING,DISCHARGING,IDLE,PRESENTorNOT PRESENT, as the charger reports it.NO SUCH BATTERY: the charger did not know the battery the meter asked about.
Answer words used in these sections: OK, WAITING, NOT SUPPORTED,
NO REPLY, BLOCKED, RESET, PD2 N/A (not available under PD 2.0).
This is the Cable screen (tab CABLE in Info): the cable's e-marker.
Hold OK to read it; from any other contract the meter requests fixed 5 V
first, then asks the cable. It scrolls (OK) through several sections.
Before or instead of a reading
HOLD OK TO ASK AT 5V,DISCOVERY IN PROGRESS,NO DISCOVERY YET,PD HALTED SEE PD PAGE,NO VALID IDENTITY.- After OK is held without a PD 3.0 contract:
NO PD ON THIS PORTorPD 2.0 ON THIS PORT, thenE-MARKER NOT READandNEEDS A PD 3.0 PORT. The cable can only be asked under a PD 3.0 contract; a USB-A port never has PD, even on a PD charger. METER PLUG IN CHARGER:thenACTS AS 5A CABLE(in the test) orNOT ACTING AS 5A CABLE/5A TEST: CHARGER PAGE.- Failures:
CABLE ID NAK,CABLE ID BUSY NO RETRY,CABLE: CHARGER BUSY,CABLE ON CC2: NOT ASKED/TURN CABLE OVER,CABLE NO GOODCRC/NO E-MARKER OR NO VCONN,CABLE RESET NO ACCEPT,CABLE NO ID RESPONSE.
CABLE SUMMARY, the cable's claims in words, one per row (a row is
left out when the cable's layout does not have it):
TYPE:PASSIVEorACTIVE, thenCAPTIVEwhen one end is fixed to a device instead of a plug.USB: the highest speed generation the cable publishes:USB 2.0,USB3 GEN1,USB3 GEN2(PD 2 cables),USB3/4 GEN2,USB4 GEN3orUSB4 GEN4. A rate follows only where the generation alone fixes it:USB 2.0 / 480Mbps,USB4 GEN3 / 40Gbps,USB4 GEN4 / 80Gbps(USB4 over both lanes; an active cable must say it carries two). Gen1 and Gen2 get none, because their code does not say whether one lane or two are used (5 or 10 Gbps, 10 or 20 Gbps).RATING: maximum voltage and current, such as50V 5A, thenEPRwhen the cable sets its EPR bit (a charger checks that bit, not the voltage).ASSUMEDmeans the cable left the current out, so 3 A applies; PD 2 cables state no voltage;NO VBUSis an active cable that does not carry it.LENGTH: from the cable's signal delay,0-1mto6-7m,>7m, or~100mto~300mfor long active cables.VID/PID, andCERT ID(the USB-IF certification ID) when set.- Active cables also:
SBU(NO,YES, PASSIVE,YES, ACTIVE),BUILD(COPPER/OPTICAL,REDRIVER/RETIMER),LANESandMAX TEMP. MODES: the alt modes the cable advertises, once its SVID list is complete:TBT(Thunderbolt alt mode, SVID8087; the ID alone does not tell Thunderbolt 3 from 4),DP(DisplayPort, SVIDFF01), any other SVID in hexadecimal,+nfor more than fit, orNONE. A cable does not have to advertiseDPto carry DisplayPort.MAKER: the maker's name, when the cable answers the manufacturer info request with one.
? marks a reserved code. An undecodable layout shows only TYPE,
VID/PID and CERT ID.
E-MARKER DETAILS, one field per row, value in hexadecimal:
- Raw words:
VDM RAW,ID RAW,XID RAW,PRODUCT RAW,CABLE1 RAW,CABLE2 RAW,EXTRA RAW. - Decoded:
PD REV CODE,CURRENT ASSUMED,LAYOUT CODE,SVDM MAJOR,SVDM MINOR,USB HOST,USB DEVICE,PRODUCT TYPE,MODAL,ID CONNECTOR RAW,VID,XID,PID,BCD DEVICE,HW VERSION,FW VERSION. - PD 3 cables:
VDO VERSION,PLUG CODE,EPR BIT,LATENCY CODE,TERMINATION,VOLTAGE CODE,CURRENT CODE,SPEED CODE. - Active cables also:
SBU UNSUPPORTED,SBU ACTIVE,VBUS THROUGH,SOP2 PRESENT,MAX TEMP C,SHUTDOWN TEMP C,U3 CLD POWER CODE,U3 VIA U3S,OPTICAL,RETIMER,USB4 UNSUPPORTED,USB2 HUB HOPS,USB2 UNSUPPORTED,USB3 UNSUPPORTED,TWO LANES,OPTICALLY ISOLATED,ASYMMETRIC USB4,GEN2 OR HIGHER. - PD 2 cables:
PLUG CODE,PLUG RECEPTACLE/B17 RAW,LATENCY CODE,TERMINATION,SSTX1 RAW,SSTX2 RAW,SSRX1 RAW,SSRX2 RAW,CURRENT CODE,VBUS THROUGH,B3 RAW/SOP2 PRESENT,SPEED CODE.
LAST SVID REPLY: the cable's list of supported SVIDs (VDO:nn words).
SVID:xxxx MODES SORTED: the modes of each SVID, or SVID SET REFRESHING, LIST NOT COMPLETE, READ IN PROGRESS, READ NEEDS SAFE FIXED5V.
MANUFACTURER INFO (VID/PID), ACTIVE CABLE STATUS and
SOP2 CABLE STATUS (T: temperature or N/A/LOW, SHUTDOWN:0/1,
SYNC:, NO SOP2 ADVERTISED, LAYOUT/PRESENCE UNKNOWN, PD2 NO GET_STATUS, SECOND PLUG NO DATA).
Status words: NOT QUERIED, ACK, NAK, BUSY NO RETRY,
TIMEOUT NO RETRY, LIST INCOMPLETE, NOT SUPPORTED.
This is the System screen (tab SYSTEM in Info): meter information and
health. Press OK to scroll through its sections.
SYSTEM INFO
SERIAL: the meter's serial number, as the original firmware's About page shows it, read from flash data that updates leave in place;-if erased.VERSION: the firmware version.METER TEMP: an experimental estimate of the meter's own temperature from PA5, using the stock firmware's thermistor equation (beta 3380 K, T0 25 C, ratio(4095-x)/x). Its ADC channel is sampled only while the System page is shown. The sensor's presence and values are not verified on this hardware, and a floating input can look plausible; it is not calibrated, is not the cable, charger or ambient temperature, and must not be used for safety decisions.---means no fresh valid scan; rail and out-of-range counts are rejected.
Sensor bus
I2C FAULT OK: the bus is open.I2C FAULT BUS!: closed after a failed transfer.BUS LATCHED NO I2C ERR: closed for safety with no transfer error (a PD session left the controller unverified, or the bus never started).STEP: which step of a transfer timed out: 0 none, 1 bus free, 2 start, 3 transmit buffer, 4 byte sent, 5 stop, 6 repeated start, 7 buffer before the read address, 8 receive mode, 9 first byte, 10 second byte.SR,CR1,CR4: the I2C status and control registers at the last failure.REG FAILS: interrupt routing failures at startup; should be 0.ERRORS: failed transfers.READS: completed meter readings.
TIMING AND MEMORY
FRAME: the longest screen refresh in the last 2 seconds, in ms (a few ms when little changes; a full redraw, such as flipping the meter, shows its own time).BUTTON GAP: the longest gap between two button checks in the last 2 seconds, in ms (normally 10).STACK: the most stack used since boot / the stack size, in bytes.LAST RESET: the reset cause flags in hexadecimal, then their names:POWER,PIN,BROWNOUT,PVD1,PVD2,WDT,SWDT,PDOWN,SOFT,MPU,RAMPAR,RAMECC,CLOCK,XTAL,MULTI. After a plain plug-in onlyPOWERis set.
FLASH STORAGE (read-only)
ERR 00 AT 00000: the last failing flash operation this boot, its error flags and start address (see What is saved).- One row per storage sector: its address, first word, and
FREEwith how many words are erased (FREE 0800means an entirely blank sector).
This is the Settings screen (Back on the overview): display preferences, energy persistence, timer mode and calibration. All settings fit on one screen.
BRIGHTNESS: five bars, 20%, 40%, 60%, 80% and 95%. Saved; the backlight starts at the restored level, not always the default 60%.ROTATION:AUTO(follows the tilt sensor once the meter has stayed turned for 0.3 s, so a jolt from a button press does not flip it),NORMALorFLIPPED. Saved. Left and Right follow the screen: turned over, the two arrow buttons swap.ENERGY MEMORY:OFF(default),5s,10s,30sor60s. Saved. Shorter intervals lose less usage on power loss but cause more flash wear.TIMER:ELAPSED(default) counts powered-on time;ACTIVEcounts intervals with power above 0.2 W in either direction. Saved. Switching modes preserves the accumulated time, including any previously saved time.CALIBRATION:FACTORYorCUSTOM. OK starts the calibration steps below; holding OK sweeps the row and, once full, restores the factory values. Saved.- A failed settings save shows a storage-full or write-failure warning.
- Hint row:
< > choose OK change BACK exit, then< > dimmer/brighter OK done,< > auto/normal/flipped OK done,< > interval OK done (shorter wears)or< > elapsed/active OK done; onCALIBRATION,OK calibrate hold OK factory reset.
Calibration corrects this meter's readings against a meter you trust. It is only as good as that reference: a cheap multimeter can make readings worse. There are three steps, and each can be skipped, keeping its previous value:
ZERO CURRENT: unplug the load but keep the power on, then hold OK. The meter takes the current it averages as its zero. More than 20 mA is refused as a load rather than an offset. A short OK skips the step.CURRENT: run a steady load of at least 0.5 A. TheYOUR METERbox starts at this meter's averaged reading; Left/Right change it by 1 mA (held, 10 mA) to what your meter shows, and OK goes on. OK without a change skips the step.VOLTAGE: the same for the bus voltage, which needs at least 4 V but no load. OK saves the calibration.
The meter averages its last 1.6 s of readings when OK is pressed, so wait for the reading under the box to settle. A correction over 5% is refused: that points to the reference, not the meter. Back cancels the steps at any point and changes nothing.
The calibration applies to every voltage, current and power the meter shows, the graph, the peaks and the energy totals, and the live VBUS on the PD page. It does not change the Quick Charge trigger's own voltage checks or the ripple measurement, which uses a different input.
Passthrough shows seven screens: Overview, Lines, Energy, Graph and Ripple in Monitor, PD Sniff and System in Info; the Trigger group is left out. The Overview, Lines, Energy, Graph, Ripple and System screens read as in sink mode.
This is the Overview screen (tab OVERVIEW in Monitor) with a charger
and a device on either side of the meter. The protocol and status come from
the messages the meter overheard: in the screenshot the charger has sent
its offer and no contract has followed yet (PD, CC1 offer, 5V); once
the device requests one it reads like PD 3.0, CC2 9V 3.00A. The
chevrons show which way power flows.
The Ripple screen (RIPPLE in Monitor, after Graph) also works with a charger
and device connected through the meter. It only measures: it does not request a
voltage or change the device's PD contract.
The fields, run/hold and timebase controls and warnings are the same as on the Ripple screen above: OK steps through time per division, vertical scale and run/hold, Left/Right change the focused one, and holding OK restores the defaults. Bus voltage/current stay live while held.
This is the PD Sniff screen (tab PD SNIFF in Info): the PD messages
between the charger and the device, oldest first. The meter only listens. It
scrolls (OK) through two sections.
SNIFF CC1 RP3.0A M:9: the CC pin carrying PD, the charger's Type-C current advertisement (RPDEF,RP1.5A,RP3.0A), andMthe number of messages seen (GoodCRC acknowledgements are not counted).SNIFF STOP …: listening stopped:CC ?,GUARD,VERIFY,DRIFT(register checks),FLUSH ST,BUS,HARD RESET,RX OVERFLOW,BAD FRAME,TX FLAG,PHY FAULTorHALTED.- Each message row:
SRC/SNK: who sent it (as the message claims).- The message name:
ACCEPT,REJECT,PS_RDY,WAIT,SOFT_RESET,NOT_SUPP,GET_SRC_CAP,GET_SRC_CEX,GET_STATUS,GET_REV,SRC_CAP,REQUEST,ALERT,VDM,STATUS,EPR_SRC_CAP, and the rest of the PD message set. Unknown types show asCTRL,DATAorEXTwith their type number. #n: message ID for control messages;Nn: object count for capabilities;xxxx:xxSVID and command for VDMs;nBandCn/RQCnsize and chunk for extended messages.RQ2 FIX 9.00V 3.00A: a request for object 2 (EQfor EPR requests), fixed or PPS, voltage and current.R2/R3: the PD revision in the message.
CHARGER OFFER GCRC:n(next section): the charger's last offer, one object per row as on the Charger screen, and the GoodCRC count.- Before any message:
PASSTHROUGH RX ONLY,NO TX NO GOODCRC, andSTARTINGorWAITING FOR PD TRAFFIC.
One laptop charges directly from a charger, and through a plain inline
power meter, but not through this meter in passthrough. The PD
session completes normally (20 V request, ACCEPT, PS_RDY, then a data
role swap and Discover Identity, with no resets), yet the laptop draws no
current (0.00A). While it is connected, D+ and D− rest near 0 V with a
brief rise to about 0.85 V every second. The stock firmware behaves the
same, and this firmware only listens in passthrough, so the cause lies
outside the firmware. It is not yet known.
The SCP screen shows each field. Open Trigger → SCP and press OK. Under PD, the first OK switches to a PD-silent boot; press OK on SCP again to test. The probe performs BC1.2 entry, checks its D+ drive against 2.6–3.0 V, then reads adapter type 0x7E, with 0x80/0x81 fallback when appropriate, and the read-only rating registers (voltage and current ranges, steps and rated power). Each read gets up to three attempts. Rated power is shown only when the charger reports it. Back stops the probe.
When the charger reports complete ratings (voltage and current ranges, both steps and rated power), OK on the SCP page opens the setpoint: Left/Right change the voltage like PPS (20 mV, 100 mV held, rounded up to whole reported steps), OK moves to the current limit (50 mA, 250 mA held), and a final OK applies it. Nothing is written before that OK. The meter then re-enters SCP, re-reads the ratings, checks the request against them, the rated power and its own 4–30 V / 5 A envelope, and enables protocol output mode with D+ and temperature protection left on and a 2 s watchdog. Current is lowered before a voltage change and raised only after it. Every write is read back and never retried. The session is refreshed every 500 ms.
The output counts as ACTIVE once VBUS is within 5% of the setpoint; it
must get there within 2 s and stay there. A missed setpoint, protection or
mode loss, readback mismatch or failed transaction ends the request and
releases the lines, so the charger's D+ protection and watchdog return it to
5 V; OK starts a new request. Back only cancels an edit, restoring the
preview to the output in force, or leaves the page: like Quick Charge, the
output stays in force on other screens. Hold OK on the SCP page stops it:
the meter restores ordinary output mode and releases the lines, which pass
to Quick Charge only once VBUS is back at 5 V or 4 s have passed. No authentication registers are written.
Charger info retains the result; the overview says SCP / detected, 5V
only with confirmed evidence at default VBUS, not as an active SCP power
contract. Existing PD and QC requests take precedence. Full scans run this
identification after QC and before PD/cable checks. Failures remain unverified.
This is an active digital probe, not passive voltage-signature detection.
LINE LEVEL CHECK FAILED
means the drive/idle check refused transmission; EDGE TIMING FAILED or
NO DIGITAL RESPONSE does not establish that the charger lacks SCP.
The portable detector lives in the scp module of single-wire-protocols
in the charging-protocols workspace. Its source is selected in the root
Cargo.toml. Nothing is flashed automatically.
The FCP screen shows each field. Open Trigger → FCP and press OK. Under PD, the first OK switches to a
PD-silent boot; press OK on FCP again to test. The probe uses the same entry
and line checks as SCP, then reads the charger's FCP capability (0x21), each
output voltage it lists (0x30 onwards) and its rated power (0x22). A charger
that rejects those registers or lists voltages out of order shows NO FCP
with NO FCP VOLTAGES. Back stops the probe. The result also shows on the
Charger page, and the full scan runs this probe after SCP.
Once a charger is found, the page lists its voltages and OFF. OK opens the
choice and a second OK requests the previewed voltage. The meter re-enters
FCP, clears the charger's latched fault flags (0x28), writes the voltage
(0x2C), reads it back and applies it (0x2B), then checks the flags every
500 ms and before each change. The lowest voltage is usually 5.2 V, the
draft standard's default. The
output counts as ACTIVE once VBUS is within 5% of the voltage; it must get
there within 2 s and stay there. A fault flag, readback mismatch, missed
voltage or failed transaction ends the request and releases the lines; the
reason shows at the bottom. OFF or hold OK sets the lowest voltage again
and releases the lines, which pass to Quick Charge only once VBUS is back at
5 V or 4 s have passed.
Registers and sequencing follow Huawei's public FCP driver, cited in
the fcp module of single-wire-protocols. Not yet tried on hardware.
The AFC screen shows each field. Open Trigger → AFC and press
OK. Under PD, the first OK switches to a PD-silent boot and automatically
starts AFC detection after the restart. The probe uses the same BC1.2 entry
as SCP but keeps D+ at
0.6 V rather than raising it, checks D+ is there, then
sends AFC's 5 V request (0x08) over the same electrical interface, but
with AFC-specific framing. Detection requires the complete response-ping
sequence, not just one ping. As in Samsung's driver, response data is skipped
rather than interpreted as an acknowledgement or capability byte. Nothing
answering the initial ping shows NO AFC with NO DIGITAL RESPONSE; an
incomplete exchange leaves support unverified. Back stops the probe. The
result also shows on the Charger page, and the full scan runs this probe
after FCP.
Once a charger is found, the page lists 5 V, 9 V and OFF. OK opens the
choice and a second OK requests the previewed voltage: the meter re-enters
and sends 5 V's 0x08 or 9 V's 0x46. This AFC path reads no status
registers and configures no watchdog. If an acknowledged request does not
change VBUS to the target, it repeats up to five request groups in total,
at least 300 ms apart, without restarting the original 2 s deadline.
The output counts as ACTIVE once VBUS is within 5% of the voltage and
must stay there; an applied output gets no periodic AFC traffic. A missed voltage or failed exchange ends the request and
sends a best-effort reset and releases the lines; the reason shows at the
bottom. OFF or hold OK uses Samsung's 100-UI (16 ms) D− reset pulse and
releases the lines. Shutdown waits for 5 V for at most 4 s; that timeout
releases ownership but does not authorize a Quick Charge entry while VBUS
is still raised or unmeasured.
Request bytes, 160 µs UI, UI-spaced response-ping sampling and count bounds, trailing sync, the 2 ms response-data skip, 200 µs final gap and reset pulse are based on the nominal values in the public AFC driver and header. These are community-hosted implementation references, not a public normative AFC specification. The reference's delay macro is platform-tuned; this PHY uses nominal intervals rather than copying its delay compensation. AFC detection and 5 V/9 V switching have been tested on a charger; this is not broad charger compatibility or electrical qualification.
Quick Charge asks the charger for a higher voltage over D+ and D− instead of PD. The QC 2.0 and QC 3.0 screens drive it; the overview names it while the charger follows.
Switching out of PD. Under a PD contract a USB-C charger ignores Quick
Charge, so the Quick Charge screens show only PD MODE, and the PD Profiles
and PPS screens stay in use. OK there (< > tabs OK switch to QC, up to 20V)
switches: the meter restarts the charger with a Hard Reset and boots with PD
silent (Rd held, nothing acknowledged), so the charger falls back to non-PD
5 V and takes Quick Charge. The charger may restart one or two more times
before it settles. The meter comes back on the Quick Charge screen it left
and tests the charger at once. OK on the PD Profiles or PPS screen
(LEGACY MODE) switches back the same way, into PD, and the meter comes back on
that screen. The meter stops saving the switch once the charger had 10 s to
settle, so the next plug-in starts with PD again.
The test (TESTING THE CHARGER) runs the first time Quick Charge starts
in a boot, without a PD contract on OK, or straight after the switch out of
PD. It holds D+ at 0.6 V until the charger releases D−, then requests Quick
Charge 3.0 continuous mode and three 200 mV steps up from 5 V, then 5 V
again (a charger ignored fixed requests sent straight from continuous mode),
9, 12 and 20 V, and ends at 5 V. The checked requests all raise the output,
so a slowly falling VBUS cannot hide the steps. It puts up to 20 V on the
output port, so disconnect anything that cannot take that first. It ends
in NO CHARGING PORT (D+ and D− are not shorted) or NO QUICK CHARGE (D−
never went low) when the charger has no Quick Charge.
Fixed voltages (2.0). After the test the QC 2.0 choice opens at 5 V:
Left/Right choose among the voltages the charger took, and OK requests one and
closes the choice; Back closes it without a request. OK reopens it at the
voltage in force. The request stays in force while other screens show, so the
overview can watch it. OFF releases D+/D−, and the charger returns to plain
USB at 5 V.
Steps (3.0). On the QC 3.0 screen OK starts continuous mode at 5 V;
Left/Right then move the output by 0.2 V (held, they repeat), from 3.6 V up
to 12 V (20 V on a Class B charger), one step per 100 ms scan. OK or Back
stops adjusting; the output stays where the steps put it while other screens
show. OK reopens it there, and OFF on the QC 2.0 screen ends the steps.
Checking the output. Quick Charge never confirms a request, so the meter
watches VBUS: a request whose output has not moved halfway after 610 ms (the
charger's 60 ms filter plus PD's 550 ms supply transition limit) shows
IGNORED.
The full scan. Hold OK on the Charger screen (HOLD OK: FULL RESCAN). A
charger ignores Quick Charge under a PD contract, so the meter:
- Restarts the charger with a Hard Reset into a boot with PD silent, and runs the Quick Charge test on the QC 2.0 screen (it may restart once or twice more first; it carries on). Back abandons the scan.
- Keeps the QC result, performs read-only SCP, FCP and then AFC identification, releasing the data lines and checking VBUS at 5 V after each. Source restarts resume the stage they interrupt.
- Saves the results, restarts the charger into PD, asks for the EPR offer by itself, and opens the Charger screen with the offer, the EPR offer, the QC, SCP, FCP and AFC sections and the charger's answers. With the plug in the charger that boot is the 5 A cable test below.
Without PD, QC, SCP, FCP and AFC identification run directly and finish on Charger info, without a PD restart.
The output goes up to 20 V during the scan.
USB PD chargers only offer more than 3 A (for example 20 V 5 A, or PPS 5 A)
when they know the cable can carry it. A 5 A cable proves that with an
electronic marker ("e-marker"): a small chip in the plug that answers the
charger's SOP' Discover Identity question with a Passive Cable VDO saying
"5 A". Without that answer the charger caps every object at 3 A.
When the meter's own plug sits directly in the charger, there is no cable: the meter's plug is the cable. For a capability test the meter can answer that question itself, as the source firmware did. It does so only in the 5 A cable test. Otherwise it stays silent, and the charger offers what it would through any 3 A cable.
Running the test. It is the last part of the full scan: on the charger
page, hold OK (HOLD OK: FULL RESCAN). The charger asks the cable question only
right after plug-in, so the meter restarts the charger to be asked again:
- After the scan's Quick Charge part, it saves a one-boot "cable test" mode with the settings.
- It sends a Hard Reset. The charger removes VBUS and VCONN, which powers the meter off, then turns them back on and starts over as at plug-in.
- That boot reads and clears the mode. It opens the charger page, answers the cable question as a 5 A cable, and asks for the EPR list by itself.
During the test the meter stays on the charger page at the boot's 5 V: it only scrolls, asks for the EPR list again (hold OK) or ends the test. Other pages and profile selection are locked out, in the buttons and again in the PD session.
During the test the CAPABILITIES heading also names how that boot started:
POWER alone is the expected power cycle. The test runs only on a boot that
follows a power-up, after its one-boot mode was cleared and read back. A boot
after any reset without power loss (for example one during that clear), or a
failed clear, runs normally on the charger page with 5A TEST DID NOT START;
the mode is then cleared once the meter is up, and holding OK tries again. So
no reset can repeat the test.
Back on the charger page during the test restarts the same way into normal mode. A meter powered another way through the VBUS drop sees VBUS go and come back, then resets itself.
Releasing Rd instead, so the charger would see an unplug, does not work: the
charger kept VBUS on, and the meter's next boot got no Source_Capabilities
(ERR:0028).
Answering is a deliberate stretch of USB PD: only a real, certified cable's e-marker is meant to answer SOP'. It also tells the charger that the whole path can carry 5 A, so a load on the meter's output must then be connected with a 5 A cable.
In the test:
- Spot the setup at startup. A charger drives Rp on both CC pins of its receptacle, so the meter sees Rp on both. The charger also powers VCONN on the plug's second CC pin, the pin a cable's e-marker would use. The CC check compares each pin against a 2.1 V threshold, which is above any valid Rd-line level (max 2.04 V). One pin above it is the VCONN pin, so the charger talks on the other pin.
- Start immediately. The charger asks the cable question only in the first moments after attach and gives up after about 20 unanswered tries. So the meter picks the talking pin from the voltages instead of listening for traffic first, and starts its PD session at once with SOP' reception on.
- Answer as a 5 A passive cable. A SOP'
Discover Identityfrom the charger is acknowledged and answered with an ACK carrying the Cable Plug flag, an ID Header (passive cable, Type-C plug), and a Passive Cable VDO for 5 A, 20 V, USB 2.0 (firmware/src/pd_spr_phy.rs,EMARKER). Other SOP' messages get their GoodCRC and no reply, like a cable without modes. - The charger raises its offer. From then on Source_Capabilities show the 5 A objects, as with a real 5 A cable.
EPR objects. The 28 V and higher objects are sent only on request. Once a
charger whose first object sets EPR Mode Capable gives a contract, the meter
sends EPR_Get_Source_Cap by itself, then collects the chunked
EPR_Source_Capabilities answer. The page then lists every object the charger
has. The query alone does not enter EPR mode.
Confirming a supported 28 V or EPR AVS profile starts entry and reports entry
failure in the UI. Selecting an SPR profile exits through an SPR-object
EPR_Request; stopping first establishes a 5 V SPR contract and exits EPR mode,
and completes even if Back is released during the exit. A real EPR cable is
required; the fake marker is unchanged. With the meter's plug straight in the
charger there is no cable, so the profile and AVS pages leave EPR out; the
charger page still lists it. If the charger keeps the line busy, the
query is retried a bounded number of times, and the page then says to hold OK
again.
Sending while the plug sits in the charger. In this setup the talking pin can show the plain default Rp level instead of the PD 3 "you may send" level. A quiet default level for 100 ms is treated like the already-approved stale "wait" level, so the meter can still start its own requests.
The meter itself is rated 4-30 V, 0-12 A, so 5 A through its plug is within
its rating. This is only done with the meter's plug in the charger and during
the test; with a real cable in between, the cable answers for itself. Without
the test, the cable page reads NOT ACTING AS 5A CABLE, and the charger page
marks objects that are only offered at 5 A with *.
There is no hardware test rig, so run this list on the meter after every flash
that touches the behaviour in a step. Leave the output unloaded, or use a load
rated for the selected voltage. Any ERR: code, unexpected restart or frozen
screen fails the run: note the code and the System page LAST RESET: first.
Before flashing:
- The build checks and host tests pass, the image passes the offline
audit, and
flasher --dry-runaccepts it.
Passthrough (slider at passthrough, then power up):
- The overview measures. Nothing negotiates, and the charger powers the far side as if the meter were a plain cable.
Sink (slider at sink, then power up from a PD charger through a cable):
- The overview shows voltage, current and the flow chevrons. Tilt the meter:
with rotation on auto, the screen follows, and Left and Right swap with
it. On the overview, hold OK:
MAXresets once the card has filled. OK, Right: the lines page updates D+, D-, CC1 and CC2, and the CC pin the overview names reads above 0 V. Compare the values with a multimeter where the lines are reachable. Right: Energy counts up under load. Right: Graph plots the last minutes; OK and Left/Right switch the trace and window. - Settings (Back on the overview): all five settings fit without scrolling.
TIMER: ELAPSEDcounts even without a load;ACTIVEpauses without a load and advances with a steady load above 0.2 W. Switching modes keeps the accumulated time. Change brightness, rotation and timer mode, then unplug and plug in again: all three are kept. With energy memory on, wait for a checkpoint before unplugging; the saved totals and time return. - PD Profiles page (Trigger group, OK to reach its tabs): step through the profiles, confirm one, check the overview voltage, then go back to 5 V.
- PPS page (PPS charger): step voltage and current, confirm, check the
overview. AVS page (SPR AVS charger): step the voltage, confirm, check the
overview.
Charger page with a PD power bank: the
BATTERYsection lists its charge. - Charger page (Info group): it lists the offer. With an EPR charger the
28 V and higher objects appear by themselves. With a 3 A cable, objects
that need 5 A carry
*. With a real EPR cable, request 28 V or an EPR AVS voltage: the hint row showsEPR: entering mode, then the overview reads the voltage and the charger page countsKEEP:up. Requesting an SPR profile returns to SPR; so does holding Back, which then stops at 5 V. With the meter's plug straight in the charger, the profile and AVS pages leave EPR out. - Cable page with an e-marked cable, from 9 V or higher: hold OK drops to 5 V and it shows the marker's details.
- System page: serial number, firmware version and meter temperature appear
first. Scroll to check that
LAST RESET:readsPOWERafter a plain plug-in and the I2C fault counters stay at zero. The experimental temperature needs comparison with an independent temperature reference and must rise as the meter warms; a plausible number alone does not establish sensor validity. Compare line/ripple readings and Quick Charge operation before and after visiting System. - Unplug and plug the charger back in mid-session: the meter boots and negotiates again.
- A port without PD (computer USB-A, or Type-C without PD): the PD page
reports no capabilities, the overview keeps measuring with its heartbeat
dot not red, and the System page reads
I2C FAULT OK.
5 A cable test (meter plugged straight into the charger, no cable):
- On the charger page, hold OK. The screen blacks out once, then the charger
page shows
POWERin its heading and lists the 5 A objects. - Left, Right and the other tabs and groups do nothing. Hold OK: the EPR list is asked for again.
- Back: one more restart, into normal mode. The 5 A objects carry
*again, and the cable page readsNOT ACTING AS 5A CABLE. - If a test boot ever shows
5A TEST DID NOT START, record its heading. Then holding OK must try once more and not loop.
See the safety contract before changing PD handling or preparing an image. Compilation is not hardware or USB-IF qualification. The firmware runs on the meter and some features have been checked by hand, but there is no systematic hardware regression suite. The experimental meter-temperature input and accuracy remain unverified. Packaging must independently preserve the bootloader and settings regions; passing the offline audit and dry-run still does not authorize flashing. Runtime architecture cleanup and hardware qualification remain separate from this port.
Rust 2024 firmware using Embassy on HC32. The application and FUSB302 adapter are local; the HAL, PAC, portable PD policy and PD engine are pinned Git dependencies. No external source snapshots are maintained here.
The native PHY and policy engine use the same pinned Git usbpd-traits; no
crates.io patch is needed. fusb302-pd has no controller driver dependency: its
register map, bit fields and FIFO tokens come directly from the data sheet below.
firmware/: startup, peripheral ownership, async tasks, meter/UI and PD routing.firmware-core/: board limits, buttons and navigation, panel geometry, settings records, and the energy totals and graph history.firmware-image/: shared container layout, builder, checksum validation and the self-unpacking release format.firmware-pack/: host-only Rust release packing and auditing.flasher/: host-only Rust USB flashing.fusb302-pd/: checked controller configuration, FIFO transport, gated sink sessions and receive-only passthrough.
The firmware starts at the existing bootloader's application entry. The PD
stack runs from upper flash (0x44000–0x6c000), which the bootloader's
update never writes; a release image fills it on its first boot (see
Package and audit offline). It does not use the
original graphics bank and may grow into it; "standalone" does not mean
a replacement bootloader or a self-contained whole-flash image. Legacy hybrid overlays, offline firmware
experiments and historical test suites are not included. firmware-pack reuses
the shared firmware-image builder for standalone generation and offline auditing;
flasher provides guarded USB flashing without imposing the project's vector
policy on stock/custom firmware.
Document names, revisions and links are defined here only. Source comments use
the alias followed by a table or section, for example DS Table 38. Do not
repeat document URLs, revision numbers or alias definitions in source files.
Table numbers belong to the cited revision; check them before moving to another.
Only two parts are confirmed: the HC32F460, and the FUSB302B, whose device ID is checked at every boot. The power monitor, tilt sensor and display controller are inferred from their bus addresses, their register behaviour and the original firmware's startup commands. No chip marking or ID register has confirmed them, so the INA, LIS and ST documents describe the parts they behave as.
- Armv7-M ARM — ARMv7-M Architecture Reference Manual, ARM DDI 0403E.b: BL and BLX (register) encodings (A7.7.18, A7.7.19) and exception entry stacking (B1.5.6).
- DS — FUSB302B Programmable USB Type-C Controller w/PD data sheet,
onsemi Rev. 5, August 2021
(publication order number
FUSB302B/D): I2C address (Table 15), register map (Table 16), per-register fields (Tables 17–39), FIFO access (Table 40), TX/RX FIFO tokens (Tables 41–42) and I2C timing (Table 14). - INA — INA226 36V, 16-Bit, Ultra-Precise I2C Output Current, Voltage, and Power Monitor With Alert data sheet, TI SBOS547C, revised August 2026: target addresses (Table 6-2), register map (Table 7-1), configuration fields (Tables 7-2 to 7-6), Bus Voltage LSB (Table 7-8), Mask/Enable (Table 7-12) and calibration (Equation 1).
- LIS — LIS3DH MEMS digital output motion sensor data sheet, ST DocID17530 Rev 2, December 2016: I2C address (Table 16), register map (Table 21), CTRL_REG1/3/4 (Tables 29–31, 35–38), INT1_CFG and interrupt modes (Tables 53–55), INT1_THS (Tables 58–59) and I2C timing (Table 8).
- RM, Errata and HC32 Datasheet — the HC32F460 reference manual, errata sheet and data sheet, as defined in the pinned HAL repository's README. The data sheet's pin function tables are Table 2-1 (Func0–15 and each pin's Func32–63 group) and Table 2-2 (Func32–63 by group).
- ST — Sitronix ST7789V 240RGB x 320 dot 262K Color with Frame Memory Single-Chip TFT Controller/Driver data sheet, Version 1.3 (2014/03): source outputs (section 2), system commands (section 9.1: SLPOUT 9.1.12, CASET 9.1.20, RASET 9.1.21, MADCTL 9.1.28) and panel commands (section 9.2).
- TPS2514 — Texas Instruments TPS2513, TPS2513A, TPS2514, TPS2514A USB Dedicated Charging Port Controller data sheet, SLVSBY8D (June 2020), from ti.com: divider and 1.2 V modes (sections 8.3.3 and 8.3.4) and their output voltages (section 7.5).
- USB PD — Universal Serial Bus Power Delivery Specification, Release 3.2,
Version 1.2 (August 19, 2026), from the
USB-IF document library.
Bare
section/Tablenumbers in PD code refer to this revision; it is a reorganization of Version 1.1, so V1.1 numbers must not be reused. PD 2.0 behaviour cites Release 2.0, Version 1.3 (January 12, 2017) asPD2 V1.3.
Use the current stable Rust toolchain:
rustup target add thumbv7em-none-eabihf
cargo fw --lockedThe ELF is target/thumbv7em-none-eabihf/release/firmware.
cargo fmt --all -- --check
cargo check --locked --workspace --exclude firmware
cargo check --locked -p firmware --target thumbv7em-none-eabihf
cargo clippy --locked --workspace --exclude firmware --all-targets -- -D warnings
cargo clippy --locked -p firmware --all-features --target thumbv7em-none-eabihf -- -D warnings
cargo test --locked -p fusb302-pd --lib
cargo test --locked -p firmware-core --lib
cargo test --locked -p firmware-core --test settings_store --test temperature
cargo test --locked -p firmware-core --example screens system_info_preserves_serial_format
cargo test --locked -p firmware-pack --test cliRun these test commands on the host, without an embedded --target.
The libraries set test = false, so their unit tests need the explicit
--lib; integration and screenshot tests are selected separately above.
The CLI regressions exercise standalone container generation and audit refusal paths with synthetic files. They never discover or open a device.
Diagnostic features are opt-in: pd-hold-diagnostic holds Rd without a sink
session; pd-boot-diagnostic boots on the PD page and records progress;
cable-log records cable inspection/fatal events; flash-probe adds
read-only flash sections to the System page; i2c-rx-poll-diagnostic
enables the HAL's receive diagnostic. Flash logging writes persistent storage,
so diagnostic images are not interchangeable with the normal build.
Uses current stable Rust. cargo fw builds two programs: the firmware and
the unpacker. firmware-pack packs them into one release image: the unpacker,
followed by the upper-flash code and the main firmware, both compressed
with LZMA2. No baseline image, template file or download is required. pack
refuses existing outputs rather than overwriting them; audit checks an exact
hash-confirmed image against the supplied builds. Both emit JSON reports to
stdout and never access USB hardware. The build below also supplies the USB
unpacker, which is used only when the standalone image won't fit.
cargo fw
cargo build --release -p firmware --bin unpacker --target thumbv7em-none-eabihf \
--target-dir target/usb --features usb-install --locked
mkdir -p build
ELF=target/thumbv7em-none-eabihf/release
USB=target/usb/thumbv7em-none-eabihf/release/unpacker
cargo run --release -p firmware-pack --locked -- pack \
--firmware "$ELF/firmware" --unpacker "$ELF/unpacker" --usb-unpacker "$USB" \
--out build/firmware.X1C > build/package.json
IMAGE_SHA256=$(sha256sum build/firmware.X1C | cut -d ' ' -f 1)
cargo run --release -p firmware-pack --locked -- audit \
--image build/firmware.X1C --confirm-sha256 "$IMAGE_SHA256" \
--firmware "$ELF/firmware" --unpacker "$ELF/unpacker" --usb-unpacker "$USB" > build/audit.json
cargo run --release -p flasher --locked -- \
--dry-run --image build/firmware.X1C --confirm-sha256 "$IMAGE_SHA256"The bootloader only writes the 26 sectors at 0x10000–0x44000, so the
release is packed to fit there. On its first boot the unpacker runs from RAM:
it inflates both streams and checks their lengths and hashes, writes the PD
code to upper flash, then writes the main firmware over itself and resets into
it. Sectors that already hold the right bytes are skipped. pack replays the
same unpacking to prove the main firmware never erases stream bytes it has
yet to read. Its report's unused_content_bytes is the compressed room left
in the release, and release breaks the sizes down per region.
If the standalone image won't fit, the packer appends the upper region for the flasher to send over USB after the bootloader step. The format is selected at packaging time; the flashing command is the same.
Force a two-stage build for local testing
Use the commands above, replacing --unpacker "$ELF/unpacker" --usb-unpacker "$USB"
with --unpacker "$USB" --usb-install in both pack and audit. For hardware
validation, configure a private test USB ID in firmware-image/src/link.rs,
then rebuild the USB unpacker and flasher with the same ID. Do not redistribute
these test builds.
On one meter under Linux, a two-stage build with a private test ID completed in one flasher run and booted. A separate test paused after erasing the first application sector, before programming it. After a power cut at that point, the factory bootloader accepted a known-good standalone image, which booted into the Overview screen.
The standalone container uses the layout implemented by firmware-image::build_container:
the two-byte prefix, application bytes, zero fill, a 16-byte descriptor at
payload offset 0x333fc, a big-endian additive checksum at 0x3340c, the
0x80 marker and 559 zero trailer bytes. The complete file is 210498 bytes
(210496-byte payload, 3289 chunks, 26 sectors). The audit verifies its exact hash,
application bytes and vectors, container structure, checksum, trailer and erase
envelope. The application
must fit in 209916 bytes (0x333fc); the linker and packager protect the
reserved descriptor and refuse oversized builds.
The generated container passed all 26 batch checks and final bootloader verification on Linux. The flasher waits for flash programming to settle before verification and checks response packet checksums. Final verification has failed intermittently (code 4) after every batch was accepted, so the flasher then erases and writes the same image once more. If that also fails, stop and follow the flashing error guidance. An offline audit is not runtime or safety qualification; neither an audit nor a matching hash authorizes flashing.
.github/workflows/firmware.yml runs on pull requests, pushes to main, manual
runs and firmware-v* tags, independently of flasher releases. It checks
formatting, firmware Clippy (including diagnostics), and the offline packaging
regressions, then builds normal release firmware without diagnostic features
for thumbv7em-none-eabihf.
Every run packs the release .X1C from those builds, runs the offline image audit,
and validates it with the Rust flasher's --dry-run. No original firmware file,
download URL, firmware-specific repository variables or secrets are needed.
It never opens USB hardware or flashes a device. Invalid applications, containers
or failed audits block publication. Generated release files live in the ignored
dist/ directory; it is build output, not source code.
For standalone images, CI provides a firmware build artifact with the image
and packaging/audit JSON reports. CI audits two-stage images but does not upload
or release them until the final USB ID is validated and a compatible flasher
has been released. Pushing an unused firmware-v tag publishes an eligible
build as a GitHub Release
after all checks pass. For example, after committing and pushing the source:
git tag firmware-v0.1.0
git push origin firmware-v0.1.0Use an independent version matching firmware/Cargo.toml. A version with a
suffix, such as firmware-v0.1.1-test.1, is published as a pre-release, so it
never becomes the latest release. Downloads contain
firmware.X1C, SHA256SUMS and the project licenses. Packaging/audit JSON reports
stay in CI artifacts; they are not release downloads and are not needed to flash.
Verify SHA256SUMS (Linux:
sha256sum --check SHA256SUMS; macOS: shasum -a 256 --check SHA256SUMS), or on
Windows compare Get-FileHash .\firmware.X1C -Algorithm SHA256 with its manifest
entry. Use the lowercase image hash with the flasher commands below. A CI audit
is structural validation, not hardware or safety qualification.
Publishing a release does not authorize device I/O or establish runtime safety.
Before flashing, approve the exact .X1C and SHA-256, follow the flashing checks,
and verify final bootloader acceptance and successful boot. Build reports are
for offline diagnostics; users only need the image, its checksum and the flasher.
Only the publishing job has release-write permission; actions are pinned to full commit hashes. Firmware tags do not trigger the flasher workflow, and flasher tags do not trigger the firmware workflow.
Bootloader mode: hold Back and OK together while plugging the meter into the computer. The meter then starts in its bootloader, ready to be flashed, instead of the firmware.
Use the project's flasher. The same command handles standalone and two-stage
.X1C images; there is no flag or manual reconnect for the second stage. A
local two-stage build needs a compatible flasher, not an older version or the
vendor tool.
Download the archive and its .sha256 file from a flasher-v* release under
GitHub Releases.
Flasher releases are separate from firmware releases. Choose the archive for
your OS and CPU:
- Linux x64:
flasher-x86_64-unknown-linux-gnu.tar.gz(glibc-based Linux; built on Ubuntu 22.04). - Windows x64:
flasher-x86_64-pc-windows-msvc.zip(Windows 10/11). - macOS Intel:
flasher-x86_64-apple-darwin.tar.gz. - macOS Apple Silicon:
flasher-aarch64-apple-darwin.tar.gz.
Verify the archive against its accompanying checksum before extracting it.
On Linux use sha256sum --check ARCHIVE.sha256; on macOS use
shasum -a 256 --check ARCHIVE.sha256, replacing ARCHIVE with the download's
name. On Windows compare Get-FileHash .\ARCHIVE.zip -Algorithm SHA256 with the
hash in its .sha256 file. Extract the archive using your OS's archive tool.
If no flasher release has been published yet, build from source.
You need:
- The extracted
flasherorflasher.exeand an independently approved.X1Cfirmware container with its exact lowercase SHA-256. Flasher archives contain no firmware images; raw.binfiles are not accepted. - A data-capable USB connection; flashing requires the device in Bootloader mode. Leave the output unloaded during the update.
- On Linux, permission to access the HID device. If opening it is denied, use
sudofor the device-access command or configure a hidraw udev permission rule for bootloader USB ID1105:000a. For a local two-stage test, also allow the installer's USB ID configured in the test build. An offline dry-run needs no USB permissions. - On Windows, the built-in HID driver; do not replace it with a libusb driver.
The downloaded binary needs no Rust installation, build tools or separate HIDAPI DLL. Building and packaging from source uses Rust tooling, not a scripting runtime. Release binaries are not certificate-signed or Apple-notarized; follow your OS's security policy when running downloaded code.
Open a terminal in the directory containing the extracted executable and your
firmware. Replace <approved-sha256> with the independently approved image hash,
not merely the hash of an arbitrary download. To inspect the local file's hash,
use sha256sum firmware.X1C on Linux, shasum -a 256 firmware.X1C on macOS, or
Get-FileHash .\firmware.X1C -Algorithm SHA256 in PowerShell, then compare it with
the approved value. PowerShell displays uppercase hashes; the confirmation
argument must be lowercase.
First validate offline; this does not discover or open hardware:
# Linux/macOS
./flasher --dry-run --image firmware.X1C --confirm-sha256 "<approved-sha256>"# Windows PowerShell
.\flasher.exe --dry-run --image .\firmware.X1C --confirm-sha256 "<approved-sha256>"After connecting in Bootloader mode, an optional mode query is ./flasher --info
on Linux/macOS or .\flasher.exe --info in PowerShell. This performs device I/O
and needs separate authorization; mode 0 means bootloader. It cannot be combined with --dry-run or image arguments.
Only after approving the exact image and hash, flash it:
# Linux/macOS: this writes the device
./flasher --image firmware.X1C --confirm-sha256 "<approved-sha256>"# Windows PowerShell: this writes the device
.\flasher.exe --image .\firmware.X1C --confirm-sha256 "<approved-sha256>"The flasher identifies the image format and shows progress for each stage.
Add --verbose (or -v) for image details and per-batch USB diagnostics.
For a two-stage image, connect only one meter. The flasher stops before
writing if it sees both a bootloader and a waiting installer. For a standalone
image, if multiple matching HID paths are found, use --device "<HIDAPI-path>"
with an exact path shown by the error. --device selects the starting
bootloader, not the installer, and disables resuming a waiting installer.
Before USB discovery it checks the exact image hash, container prefix, checksum, trailer and application erase limits. It keeps those validated bytes in memory. It accepts stock and custom application layouts, with no hash deny list or project-specific vector checks. Passing validation does not establish that an image is compatible or safe to run.
After verifying bootloader mode, it erases only the application envelope, sends 64-byte HID reports in checksum-acknowledged batches, requests final bootloader verification, and sends reboot only after final acceptance. A partial final report is zero-padded for transport without changing the image or its checksum. The bootloader stage does not write outside the application envelope.
If final bootloader verification returns code 4, the tool automatically makes one more full erase-and-write pass with the same approved image. Other transport or protocol errors stop immediately. It never restores another image.
Keep the meter powered until the measurement screen appears. A blank,
backlit screen is normal while the firmware is being installed. For a two-stage
image, the flasher waits for the temporary installer after reboot and sends
and verifies the remaining data. It skips this transfer if the data is already
installed. Transfer complete does not mean the update is finished: the
meter is still writing the main firmware and will reboot on its own.
Linux flashing has passed final verification for both the generated project image and stock firmware; stock boot was confirmed. The x64 Windows GNU cross-build has also flashed project and stock firmware, and the Windows MSVC and macOS release builds have flashed the project firmware. See the safety contract for the full limits.
- If a two-stage meter is waiting in the installer (blank, backlit screen and
visible to the PC as the installer), run the same command with the exact same
image and hash, without
--device. If reconnecting, don't hold any buttons. The flasher refuses to resume with a different build. - If the backlight blinks, the screen stays dark, or you no longer have the
exact image needed to resume, reconnect while holding Back + OK and flash
a known-good
.X1C. The factory bootloader is not overwritten. - If the command exits with an error before the bootloader accepts the image, leave the meter in bootloader mode. It has not been told to reboot. A retry or restoration still requires approval of the exact image and hash.
.github/workflows/flasher.yml validates pull requests, pushes to main and
flasher-v* tags using current stable Rust. Offline tests check image validation,
installer selection and transfer. The workflow builds the flasher natively on
Linux, Windows and both macOS architectures, runs --help without hardware
access, and packages the executable, README and licenses. Firmware images are
not included.
Regular CI and manually dispatched runs provide downloadable build artifacts.
Pushing a flasher-v version tag publishes GitHub Release downloads
only after validation and every package job succeed. Flasher releases are
independently versioned; firmware-v* tags do not trigger this workflow.
Each archive listed above gets a .sha256 checksum file.
After committing and pushing the release source, use an unused version matching the flasher package version, for example:
git tag flasher-v0.1.1
git push origin flasher-v0.1.1Only the final publishing job receives release-write permission. The actions are pinned to full commit hashes. Binaries are not certificate-signed or Apple notarized; packaging does not replace hardware validation.
If you prefer a local build, install current stable Rust and run:
cargo build --release -p flasher --lockedThe native executable is target/release/flasher or
target/release/flasher.exe; use that path in the commands above. Native Windows
MSVC builds need the C++ Build Tools; macOS builds need Xcode Command Line Tools.
Linux uses native hidraw without libusb/libudev development packages. Windows
and macOS statically compile HIDAPI's bundled C backend.
To cross-compile the x64 Windows executable on Linux, install Zig and cargo-zigbuild, then run:
rustup target add x86_64-pc-windows-gnu
cargo zigbuild --release -p flasher --target x86_64-pc-windows-gnu --lockedThe executable is target/x86_64-pc-windows-gnu/release/flasher.exe; copy it and
the exact confirmed firmware container to Windows. No Rust installation or
separate HIDAPI DLL is required on the destination. The shared firmware-image
crate keeps the host flasher independent of the embedded runtime dependencies.
You can. The bootloader is never touched, so Back + OK still works after this firmware has run. The PD code this firmware unpacked into upper flash stays there; stock does not use that range. Flashing the stock V1.0.5V image back over it was tested on a real meter: stock booted, and its settings and PD triggering worked normally. This firmware's saved settings records stay in flash, and stock ran fine with them there.
Stock images can be found through this blog post. This project is not associated with its author, and the images are not distributed here.
The Rust flasher accepts original firmware containers with the same hash,
container and erase-limit checks described above. Use --dry-run first; actual
stock flashing succeeded with the x64 Windows GNU cross-build.
The vendor's updater is another option.
Thanks to @tomoca2 for these hands-on articles in Japanese. They cover earlier firmware releases; screenshots and controls may differ from the current version.
- Firmware introduction and feature walkthrough (Japanese).
- Sink-port inspection and v0.11.0 hands-on review (Japanese).
This project's original code is dual-licensed under either
MIT or Apache-2.0, at your option
(MIT OR Apache-2.0). Third-party material is subject to its own terms.

























