docs(adc): 前端拓扑改 SVG,③ 段定死 1:1(本板不是分压器)

ASCII 拓扑图把 C44 / R32 画成挂在 ADC7 下的一根竖线,读起来像 2:1 分压,
恰是文档要否掉的结论。改为两个节点分开画的 SVG,并加 STM32 侧对照面板。

- 新增 tools/arch_diagram/gen_adc_frontend_svg.py →
  docs/images/ADC前端电路.svg(纯标准库 + 文字溢出预检 + 幂等重跑)
- docs/测试说明/ADC前端注入验证流程.md §2、docs/硬件平台/
  ADC通道映射说明.md §7.1 的 ASCII 图换成该 SVG
- ③ 段(AINn ↔ 转换器引脚)定死变比 1:1:ADCn 节点只有
  {串阻.2, 滤波 C, 转换器引脚},无对地元件;"1k 到地"接在差分负端
- 305.18 / 1611.3 µV/码(读法 A)作废;数据可信.md §2.1 表改为
  引脚侧系数 152.59 / 805.66,卡 0 判据从"判别两种读法"降为
  "确认转换器 LSB 与逐通道映射"
- 顺带修 ADC通道映射说明.md §8 步骤 1 的 §5.1 自引用误判
  (文档名以 V0.0 开头被前缀规则误认,改写成全路径形式)

门禁:Keil 无关(纯文档 + 生成器);check_ids --strict、
check_doc_links --all --sections-strict、pre-commit 全过。
This commit is contained in:
2026-10-27 17:08:56 +08:00
parent 343305b433
commit 9163a92d3b
7 changed files with 466 additions and 105 deletions
+75
View File
@@ -0,0 +1,75 @@
<svg xmlns="http://www.w3.org/2000/svg" width="980" height="776" viewBox="0 0 980 776" font-family="Microsoft YaHei, Segoe UI, PingFang SC, sans-serif">
<rect x="0" y="0" width="980" height="776" rx="0" fill="#ffffff"/>
<text x="60" y="44" font-size="20" font-weight="700" fill="#0f172a">ADC 前端注入通路 —— 本板不是分压器</text>
<text x="60" y="72" font-size="13" fill="#64748b">网表 V0.1.tel 第 241 行:ADC7 ; C44.2 R31.2 U3.61 —— 该节点只有三个连接,没有任何对地元件</text>
<text x="60" y="92" font-size="13" fill="#64748b">所以端子侧与引脚侧斜率相同(TPAFE 6553.6 码/V、STM32 1241.2 码/V),注入点优先选端子侧焊盘</text>
<text x="60" y="138" font-size="14" font-weight="700" fill="#0f172a">A · UA 通道(TPAFE5160 侧)</text>
<line x1="60" y1="150" x2="940" y2="150" stroke="#cbd5e1" stroke-width="1"/>
<rect x="60" y="214" width="130" height="72" rx="10" fill="#eff6ff" stroke="#2563eb" stroke-width="1.6"/>
<text x="125" y="242" font-size="14" text-anchor="middle" font-weight="700" fill="#2563eb">端子侧</text>
<text x="125" y="264" font-size="12" text-anchor="middle" fill="#2563eb">U5.A3 · AIN1</text>
<line x1="190" y1="250" x2="250" y2="250" stroke="#334155" stroke-width="2"/>
<rect x="250" y="240.0" width="90" height="20" rx="3" fill="#ffffff" stroke="#334155" stroke-width="1.6"/>
<text x="295.0" y="226.0" font-size="12" text-anchor="middle" fill="#64748b">R31 · 1 kΩ</text>
<text x="257" y="278" font-size="11" fill="#94a3b8">1</text>
<text x="333" y="278" font-size="11" text-anchor="end" fill="#94a3b8">2</text>
<line x1="340" y1="250" x2="600" y2="250" stroke="#334155" stroke-width="2"/>
<circle cx="600" cy="250" r="5.5" fill="#0f172a"/>
<text x="600" y="214" font-size="14" text-anchor="middle" font-weight="700" fill="#0f172a">ADC7</text>
<text x="600" y="232" font-size="12" text-anchor="middle" font-weight="700" fill="#d97706">无对地分流电阻</text>
<line x1="600" y1="250" x2="720" y2="250" stroke="#334155" stroke-width="2"/>
<line x1="600" y1="250" x2="600" y2="290" stroke="#334155" stroke-width="2"/>
<line x1="580" y1="290" x2="620" y2="290" stroke="#0f172a" stroke-width="2.4"/>
<line x1="580" y1="306" x2="620" y2="306" stroke="#0f172a" stroke-width="2.4"/>
<text x="630" y="300" font-size="12" fill="#64748b">C44</text>
<line x1="600" y1="306" x2="600" y2="390" stroke="#334155" stroke-width="2"/>
<circle cx="600" cy="390" r="5.5" fill="#0f172a"/>
<text x="600" y="418" font-size="13" text-anchor="middle" font-weight="700" fill="#0f172a">ADC7_GND</text>
<text x="600" y="436" font-size="11" text-anchor="middle" fill="#64748b">(差分负端)</text>
<line x1="600" y1="390" x2="720" y2="390" stroke="#334155" stroke-width="2"/>
<line x1="600" y1="390" x2="520" y2="390" stroke="#334155" stroke-width="2"/>
<rect x="430" y="380.0" width="90" height="20" rx="3" fill="#ffffff" stroke="#334155" stroke-width="1.6"/>
<text x="475.0" y="366.0" font-size="12" text-anchor="middle" fill="#64748b">R32 · 1 kΩ</text>
<line x1="430" y1="390" x2="380" y2="390" stroke="#334155" stroke-width="2"/>
<line x1="380" y1="390" x2="380" y2="406" stroke="#334155" stroke-width="2"/>
<line x1="352" y1="406" x2="408" y2="406" stroke="#334155" stroke-width="2"/>
<line x1="360" y1="414" x2="400" y2="414" stroke="#334155" stroke-width="2"/>
<line x1="368" y1="422" x2="392" y2="422" stroke="#334155" stroke-width="2"/>
<text x="380" y="440" font-size="12" text-anchor="middle" fill="#64748b">AGND</text>
<rect x="720" y="196" width="200" height="244" rx="12" fill="#f0fdfa" stroke="#0d9488" stroke-width="1.6"/>
<text x="820" y="222" font-size="14" text-anchor="middle" font-weight="700" fill="#0d9488">TPAFE5160 · U3</text>
<text x="820" y="316" font-size="12" text-anchor="middle" fill="#94a3b8">±5 V 满量程 · 152.59 µV/LSB</text>
<text x="736" y="250" font-size="11" fill="#94a3b8">61</text>
<text x="762" y="250" font-size="13" font-weight="700" fill="#0f172a">AIN_7P</text>
<text x="736" y="390" font-size="11" fill="#94a3b8">62</text>
<text x="762" y="390" font-size="13" font-weight="700" fill="#0f172a">AIN_7GND</text>
<text x="60" y="306" font-size="12" fill="#64748b">R31 的 1 脚在端子侧、2 脚在芯片侧 —— 现场找焊盘按此定位</text>
<text x="60" y="330" font-size="12" fill="#64748b">R31 + C44 构成差分 RC 低通;C44 另一端是 TPAFE 负输入脚,不是地</text>
<text x="60" y="500" font-size="14" font-weight="700" fill="#0f172a">B · STM32 侧(以 UB 为例)—— 更简单,连接地电阻都没有</text>
<line x1="60" y1="512" x2="940" y2="512" stroke="#cbd5e1" stroke-width="1"/>
<rect x="60" y="554" width="130" height="72" rx="10" fill="#eff6ff" stroke="#2563eb" stroke-width="1.6"/>
<text x="125" y="582" font-size="14" text-anchor="middle" font-weight="700" fill="#2563eb">端子侧</text>
<text x="125" y="604" font-size="12" text-anchor="middle" fill="#2563eb">U5.B7 · AIN2</text>
<line x1="190" y1="590" x2="250" y2="590" stroke="#334155" stroke-width="2"/>
<rect x="250" y="580.0" width="90" height="20" rx="3" fill="#ffffff" stroke="#334155" stroke-width="1.6"/>
<text x="295.0" y="566.0" font-size="12" text-anchor="middle" fill="#64748b">R52 · 1 kΩ</text>
<line x1="340" y1="590" x2="720" y2="590" stroke="#334155" stroke-width="2"/>
<circle cx="720" cy="590" r="5.5" fill="#0f172a"/>
<text x="720" y="562" font-size="14" text-anchor="middle" font-weight="700" fill="#0f172a">ADC17</text>
<line x1="720" y1="590" x2="800" y2="590" stroke="#334155" stroke-width="2"/>
<line x1="720" y1="590" x2="720" y2="650" stroke="#334155" stroke-width="2"/>
<line x1="700" y1="650" x2="740" y2="650" stroke="#0f172a" stroke-width="2.4"/>
<line x1="700" y1="666" x2="740" y2="666" stroke="#0f172a" stroke-width="2.4"/>
<text x="750" y="660" font-size="12" fill="#64748b">C111</text>
<line x1="720" y1="666" x2="720" y2="690" stroke="#334155" stroke-width="2"/>
<line x1="720" y1="690" x2="720" y2="706" stroke="#334155" stroke-width="2"/>
<line x1="692" y1="706" x2="748" y2="706" stroke="#334155" stroke-width="2"/>
<line x1="700" y1="714" x2="740" y2="714" stroke="#334155" stroke-width="2"/>
<line x1="708" y1="722" x2="732" y2="722" stroke="#334155" stroke-width="2"/>
<text x="720" y="742" font-size="12" text-anchor="middle" fill="#64748b">AGND</text>
<rect x="800" y="530" width="140" height="120" rx="12" fill="#f1f5f9" stroke="#475569" stroke-width="1.6"/>
<text x="870" y="552" font-size="13" text-anchor="middle" font-weight="700" fill="#475569">STM32 ADC1</text>
<text x="870" y="622" font-size="11" text-anchor="middle" fill="#94a3b8">0~3.3 V 单极性</text>
<text x="816" y="590" font-size="11" fill="#94a3b8">44</text>
<text x="840" y="590" font-size="13" font-weight="700" fill="#0f172a">PC4</text>
</svg>

After

Width:  |  Height:  |  Size: 6.6 KiB