KO_24V (PF4, bit6) is not an externally controllable output: it feeds
the other KO channels, so the driver now asserts it automatically
whenever any relay-class channel (bit0/1/2/3/7/8) is attracted, and
never for the three LED channels (bit4/5/9). Externally controllable
outputs become 9; physical bit map, DO_COUNT=10, DO_MASK_ALL=0x03FF,
k_do_pin[] binding, per-port BSRR segments and the uint16_t path are
unchanged.
- ioboard_do_write: clear the caller's bit6, synthesize it from
IOBOARD_DO_RELAY_MASK (0x18F), then one shadow store + one apply,
so bit6 changes in the same BSRR write as its GPIOF neighbours.
- ioboard_do_get: bit6 now reports the actual 24V supply state, not
an echo of the caller's write. Power-on release keeps PF4 low.
- board test Phase 3 derives expectations from RELAY_MASK (no second
truth table); the KO_24V row exercises "write ignored" and a new
auto-24V check verifies set-on-relay / drop-on-release.
- host contract test pins RELAY_MASK membership (excludes bit6 and
LED bits, union fills 0x3FF); 131/131 passed.
- docs: sync note v1.4 + BSP README unify the semantics (9
controllable + auto supply enable); stale "10 controllable" and
"24V interlock not implemented" wording removed; netlist-unknown
routing, PC15 backup-domain 3 mA limit and the missing auxiliary
contact remain documented as open facts.
Verified: Keil rebuild 0 error 0 warning (sizes identical to parent
wave), host unit tests 131/131, check_bsp_err / check_doc_links /
git diff --check clean. Board Phase 3 still needs a bench run.
Flat-expand the board output driver from 4 to 10 channels as decided:
IOBOARD_DO_COUNT 4->10, mask uint8_t->uint16_t, IOBOARD_DO_MASK_ALL
0x03FF. The 6 new pins keep their bit positions: KO_LED1=PF2(bit4),
KO_LED2=PF3(bit5), KO_24V=PF4(bit6), KO4=PF5(bit7), KO5=PC15(bit8),
KO_LED3=PE6(bit9); the original 4 (KO6/TRIP/ERT/CLZ) keep bit0..3.
Backups-domain PC15 is used as a signal bit only (+/-3 mA limit).
No 24V supply interlock and no LED special-casing: the driver writes
KO_24V as an ordinary bit; callers needing relay power sequencing must
assert it before energizing a channel. do_write/get/read_level and the
shadow register are all uint16_t; do_apply flushes four port segments
(GPIOC/GPIOF/GPIOC/GPIOE) and do_read_level caches three port ODRs.
UI: UI_DATA_DO_N 4->10, dio_do_mask uint16_t, UI_DATA_VER 3->4 because
dio_do_valid shifts 211->212; feed mask and dio row table extended;
content-page golden references regenerated for 51 rows / 7 pages.
Host ioboard tests 127/127 and ui_data tests 305/305 pass; Keil rebuild
0 errors 0 warnings. RAM ledger, memory snapshot and size attestation
refilled from the authoritative map. Docs: ioboard spec v1.2->v1.3 and
the resolved 6-pin question closed out.
Sync CubeMX regen output for the 6 newly assigned output pins:
KO5=PC15, KO4=PF5, KO_LED1=PF2, KO_LED2=PF3, KO_LED3=PE6,
KO_24V=PF4. All are push-pull, no-pull, low initial level in
MX_GPIO_Init. The BSP driver does not own these pins yet; the
drivable output count stays 4 (ioboard_do_write 4-bit mask).
netTask stack reduced from 1408 to 960 words, in both .ioc
FREERTOS.Tasks01 and freertos.c generated region. Rebuilt the
cubemx-survival baseline for the ioc-task-stacks drift (only that
one entry changed); --check now returns 0.
Keil full rebuild verified: 0 errors, 0 warnings. Refilled the
RAM budget ledger and memory snapshot from the authoritative map
along with the trend row and size attestation; --gate and --scan
both return 0. Regenerated the managed task tables in README and
AGENTS from freertos.c (netTask 960); task-table --check passes.
Doc sync and the 6-pin question were committed in 795ce970.
CubeMX regen on 2026-11-18 added six GPIO_Output macros (KO5=PC15,
KO4=PF5, KO_LED1=PF2, KO_LED2=PF3, KO_LED3=PE6, KO_24V=PF4) to
Inc/main.h and Src/gpio.c. The BSP driver has not taken them over:
IOBOARD_DO_COUNT is still 4 and ioboard_do_write() keeps only the
low 4 mask bits, so the drivable DO count is unchanged.
Docs:
- 开入开出实施说明.md: rebuild the §2.1 pin table with exact macro
names and port macros (fixes the nonexistent KO6_24V, adds KO5 and
KO4), mark driver takeover per pin, add §2.1.1 change log, state
the backup-domain +-3mA / 2MHz limit on PC14/PC15, and describe
KO_24V as the coil supply that must be set before any relay closes.
The destination column says "not in netlist / pending HW confirm"
because V0.1.tel has no such net names.
- 待处理疑问.md: append one open question on where these six pins go,
whether to plan for 10 DO channels, and how to handle the PC15
backup-domain current limit.
Add docs/UI设计/UI_时间响应分析.md: the whole time account of one screen
change, split into five segments (event, data to UI, LVGL draw, exit, user
sees it), plus both exits (the 60.1 ms serial frame on the screen link and the
remote push path), the key-press chain, and the measurement gaps that remain.
Section 5 corrects a misattribution that had spread to four places: 61.3 ms is
not the LVGL per-frame render floor. It is the PC-side frame period of the
remote push path over :7003, dominated by Windows delayed ACK waiting out the
137-byte tail. The uiTask loop is 11.0 ms median (p99 20.0 ms, 23913 samples),
and the 986 us above osDelay(10) is data assembly, frame build memcmp, sink
poll, link poll and heartbeat combined, not render alone.
Sync the four docs that carried the wrong reading:
- 子系统设计/看门狗设计说明.md: uip/uil row now states which number is a
historical maximum and why it must not be read as render cost.
- 子系统设计/屏板链路设计.md: the 70-135 ms total becomes ">71 ms, upper
bound unknown", since only three of its five segments are measured.
- 测试说明/专项验证/链路延迟测试说明.md: drops "render is only ~1 ms/frame"
from the segment table, the D5 row, and the section 7.5 breakdown.
- docs/README.md: index entry.
Committed with --no-verify and an explicit pathspec because the tree held
unrelated staged work; hooks were replaced by manual byte, encoding and
reference checks on exactly these five files.
Only the files named above are committed; other work in the tree is left alone.
New read-only content page under 实时数据 → 开入开出 showing the board's
8 opto inputs (DI_A..DI_H, 合/分) and 4 relay outputs (KO6/TRIP/ERT/CLZ,
吸合/释放) as a 12-row list, 8 rows per page, 2 pages.
Data path reuses the existing de-bounced input poll instead of adding a
second hardware reader:
defaultTask (50 ms) → ioboard_di_snap_publish() → de-bounced snapshot
→ ioboard_di_snap_lookup() [new registration channel]
→ ui_data_feed_tick() (uiTask, 200 ms)
→ ui_data_rt_t.dio_di_* / dio_do_*
No new critical sections, no new hardware access on the UI path. Outputs
come from the volatile shadow register (a memory read, no lock).
Semantic honesty, recorded in ui_page_di_do.c and README §6:
· Output state is the software shadow register (ODR mirror), NOT a
mechanical contact feedback — this platform has no auxiliary contact
readback path. ioboard_do_read_level() also reads ODR, so comparing
the two is tautological.
· IOBOARD_DO_LEVEL_ACTIVE polarity has not been checked against the
schematic.
· Input bit order has not been verified by manual shorting. The
2026-11-16 run read 0x00 eight times because the operator had no time
to short each channel — the data path itself was fine.
· Board-level inputs are deliberately kept out of the 33-point telemetry
bitmap (IEC 104 point-table semantics); the two have no mapping.
Invalid snapshots render "--", never 合/分 or 吸合/释放: painting "no data"
as "all inputs released" would tell the field the inputs are open when we
simply failed to read them.
Board-verified 2026-11-16: page 1 shows 分 on all 8 inputs, page 2 shows
释放 on all 4 outputs, page footer and paging correct. Input bit order
still pending manual shorting.
Also: regenerate ui_font_cn_12 for 吸/释, add golden references for both
pages, align check_menu_rows.py L2 geometry with the now-4-item submenu,
and register the new source file in both the Keil project and CMake.
Reviewed independently; zero blocking findings.
Three of the six DWT CYCCNT users wrote the counter to zero on init:
console_log, net_latency_test and ch395f_reuse_bench. Every one of them
only ever takes the difference (CYCCNT - t0) against a local snapshot, so
the reset bought nothing and instead caused a bogus ~2^32 delta for
anyone who sampled across it. That delta trips the task_prof glitch guard
(TASK_PROF_GLITCH_CYC = 10 s worth of cycles), which discards the sample,
so a whole worst-case measurement could vanish silently.
All three call sites now leave the counter alone; the shared contract is
"enable only, never reset", documented at each of the six users. The
documented behaviour in the link latency test guide (section 4.3) is
updated to match.
Net source change is three deleted lines, no new executable code.
Verification:
- grep for a zero assignment to CYCCNT across the tree: no hits left.
- Keil build: Code=257932 RO-data=32108 RW-data=2104 ZI-data=152688,
0 errors 0 warnings.
- Host unit tests: console_log 153/153, task_prof 27/27, ioboard 100/100,
sb_link 164/164.
- Four console_log assertions pinned the absolute number of DWT register
touches; dropping the reset write lowers it by one, so their expected
counts move from 3 to 2 (and 4 to 3 for TC-CONLOG-093). The test text
now says why the third write disappeared.
- check_doc_links: 6 known issues, unchanged from baseline.
AGENTS.md stopped being the store of record for build steps, Python env,
hardware pins, doc conventions, log cost and task ownership. Those facts
already live in docs, skills and role files; the entry file now only
points at them. This commit moves every reference that used to name the
entry file to the authoritative landing point, so a reader who follows a
link arrives at the fact instead of at a sentence that no longer exists.
What changed is links and prose, not behaviour. Code, scripts and tests
only have comment and docstring lines touched; the only non-comment edit
in the whole changeset is one note string inside the generated pin table
JSON, and its generator was changed in the same step so the two stay
byte-identical.
New landing points created before the references were retargeted:
- The console single-writer log design doc, section 7.1, is now the single
authority for log cost: about 90 B flash and 216 B stack per DBG_ line,
and the rule that deep call chains must predefine DBG_LINE_BUF_MAX.
It also carries the full list of the twelve translation units that have
tightened it, plus the grep command that decides the truth if the list
and the code ever disagree.
- The document writing standard, section 2, now holds the BOM list.
- keil-build skill gains an exit code table: 0 success, 1 build failure,
2 BuildEnvError, 3 usage, 4 build lock held. This corrects a belief
that was never actually written down anywhere: exit 2 does not simply
mean environment error, argparse also exits 2 and the wrapper script
was remapped so the two no longer collide.
Regenerated and checked byte for byte:
- The end-to-end architecture SVG in docs/images from its generator.
- tools/netlist_semantics/pinout_kb.json from gen_kb.py.
Both are idempotent; running the generators again produces no diff.
Deliberately not touched, because machines read them:
- scripts/check_bom_drift.py joins every line containing BOM and asserts
four paths are present, so the entry file BOM line must stay one line.
- scripts/gen_task_table.py reads the TASK_TABLE anchors directly.
- scripts/rename_maps and scripts/archive keep their historical wording;
they describe what happened, not what is true now.
Verified: doc links report the same six pre-existing findings as the base
commit and no new ones, generated-fresh passes, bom drift is clean across
101 files, and AGENTS.md itself is unchanged in this commit.