PowerVista PD Sink Firmware
PowerVista PD Sink Firmware 是 STM32G431CBU6 上的多功能实时电源监控与 USB PD sink 固件。README.md 的项目名是 PowerVista,功能清单包括电压/电流/功率实时显示、PPS request、保护策略、重力感应旋转和配置存储;catalog slug pd-sink-stm32g431cbu6-rs 只是仓库 ID,不应作为人类标题。
- Embedded Rust
- STM32 firmware
- USB PD
- Async embedded
- Display driver
- MCU flashing integration
目录
技术栈
运行与交付
- 能力标记
- cargo_toml
配置与质量
- 配置文件
- .gitignore
- .gitmodules
- .markdownlint-cli2.yaml
- Cargo.toml
- lefthook.yml
- rust-toolchain.toml
- rustfmt.toml
其他信息
- Cargo
- Deps main
- cortex-m
- cortex-m-rt
- defmt
- defmt-rtt
{
"cargo": {
"deps_main": [
"cortex-m",
"cortex-m-rt",
"defmt",
"defmt-rtt",
"embassy-embedded-hal",
"embassy-executor",
"embassy-futures",
"embassy-stm32",
"embassy-sync",
"embassy-time",
"embassy-usb",
"embedded-alloc",
"embedded-graphics",
"embedded-hal",
"embedded-hal-async",
"embedded-hal-bus",
"embedded-io-async",
"gc9307-async",
"heapless",
"lsm6dso"
]
},
"configs_root": [
".gitignore",
".gitmodules",
".markdownlint-cli2.yaml",
"Cargo.toml",
"lefthook.yml",
"rust-toolchain.toml",
"rustfmt.toml"
],
"markers_present": [
"cargo_toml"
]
}Purpose
PowerVista PD Sink Firmware 是 STM32G431CBU6 上的多功能实时电源监控与 USB PD sink 固件。README.md 的项目名是 PowerVista,功能清单包括电压/电流/功率实时显示、PPS request、保护策略、重力感应旋转和配置存储;catalog slug pd-sink-stm32g431cbu6-rs 只是仓库 ID,不应作为人类标题。
Taxonomy
- Tags: Embedded Rust, STM32 firmware, USB PD, Async embedded, Display driver, MCU flashing integration
- Why / evidence: 这些 tags 来自 checked-out repo 和 catalog record。主要证据包括
README.md、Cargo.toml、DEVELOPER_GUIDE.md、pd-sink-stm32g431cbu6-rs.ioc、pd-sink-stm32g474cet6-rs.ioc、src/、docs/。Topic token 的大小写以对应技术/工作流的官方写法为准;slug 只作为稳定 ID,不直接充当项目标题。
Repository map
Cargo.toml是主固件 manifest,描述no_stdembedded、STM32、USB PD、power monitor。src/是固件入口;docs/、DEVELOPER_GUIDE.md和models/保存硬件/开发辅助材料。pd-sink-stm32g431cbu6-rs.ioc/pd-sink-stm32g474cet6-rs.ioc是 STM32CubeMX 配置证据。
Runtime and delivery
开发运行围绕 cargo build --release、probe-rs flashing 和 Embassy async runtime;target、artifact 与 SWD 参数应保持在项目配置或开发文档中,作为硬件操作记忆。
Architecture notes
架构重点是 USB PD sink 与实时测量/显示的交叉:PD 协议决定供电档位,ADC/保护逻辑决定测量和安全边界,display driver 决定人机反馈。Cargo.toml 使用 Embassy 本地 path 依赖,说明它和具体 embedded runtime 版本耦合较强,升级时不能只改 crates.io semver。
Workflow and quality gates
仓库有 lefthook.yml、rust-toolchain.toml、rustfmt.toml 和 markdownlint 配置,但没有 GitHub Actions 证据。验证应以本地 firmware fmt/build、probe-rs smoke 和硬件 bring-up 记录为主。
Reusable decisions
- Project display name 使用 README 的 PowerVista,而不是长 slug。
- 把 flashing backend、chip 和 SWD 参数与项目配置或开发文档保持一致,让后续 Agent 不必猜 STM32 probe 参数。
- USB PD / display / protection 同时存在时,Topic 必须保留这些硬件语义,不能只归入 generic embedded Rust。
Risks and open questions
- README 功能清单中仍有未完成项,snapshot 不能把 unchecked features 写成 current truth。
- path-based Embassy 依赖可能需要跟随上游子模块同步。
- 没有 CI 证据,变更后需要更依赖本地硬件或仿真验证。
Evidence index
README.mdCargo.tomlDEVELOPER_GUIDE.mdpd-sink-stm32g431cbu6-rs.iocpd-sink-stm32g474cet6-rs.iocsrc/docs/models/
相关内容
Async embedded
主题Async embedded 表示嵌入式 Rust 代码把 async 当成正式 API surface 或正式 runtime contract 来维护,而不是只在某个样例里顺手用了异步。
Config-driven ops
主题Config-driven ops 表示操作命令、硬件目标、端口、artifact、backend 或运行策略优先通过 checked-in 配置声明,而不是让维护者每次手写临时命令。它适合 MCU flashing、服务端口、部署资源和多 Agent 协作场景。
Display driver
主题Display driver 表示项目围绕显示控制器驱动建立了稳定的可复用模式,通常是面向 LCD/OLED/controller 的驱动 crate,或在产品固件中把显示驱动视为独立维护边界。这里的重点不是“有屏幕”,而是显示控制器交互本身已经成为长期维护契约。 这个 Topic 关注显示控制器层,而不是更高层的 UI/graphics 语义。
Embedded Rust
主题Embedded Rust 表示 Rust 代码运行在 MCU、driver、firmware 或硬件 bring-up 环境中,通常涉及 no_std、Embassy、esp-hal、STM32/ESP32、probe-rs、espflash 或 embedded-hal。它不是所有 Rust 项目的泛化标签。
MCU flashing integration
主题MCU flashing integration 表示项目通过 espflash 管理 ESP32 系列,通过 probe-rs 管理 STM32/其他 probe-supported MCU,并把这些 backend 接入项目配置或明确的本地操作入口。Topic token 使用可复用工程模式命名;espflash 与 probe-rs 作为具体工具名放在定义和证据里。 这个 Topic 关注的是“硬件操作入口可复现且可审计”。
STM32 firmware
主题STM32 firmware 表示项目把 STM32 系 MCU 作为正式固件目标来维护,并围绕工具链、.ioc 硬件配置、刷写后端、板级职责和与其他 MCU/外设的分工建立了稳定契约。这里的主语不是“用了 STM32”,而是 STM32 固件在系统中的角色。
USB PD
主题USB PD 表示仓库围绕 USB Power Delivery 协议或 PD-aware 固件/驱动维护代码,并把协商档位、controller 行为、sink/source 语义、PPS/AVS 等供电协商边界当成长期知识。这里的主语是供电协商协议,不是 generic embedded I/O。