• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kaidokert / rm32-private / 25648138255
65%
tmps: 63%

Build:
Build:
LAST BUILD BRANCH: bisect_init_changes
DEFAULT BRANCH: tmps
Ran 11 May 2026 03:06AM UTC
Jobs 1
Files 35
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 May 2026 03:05AM UTC coverage: 65.701% (+0.05%) from 65.649%
25648138255

push

github

kaidokert
Portable ResetCause: lift chip-specific RCC_CSR decode out of main.rs

The reset-cause decode in main.rs was wrapped in `#[cfg(feature =
"stm32l431")]` because field-style PAC access for RCC_CSR is L431-specific
— other MCU PAC versions use method-style and would fail to compile. That
worked but pushed chip details into shared code.

Replace with a portable abstraction:

- `rm32::reset_cause::ResetCause`: a chip-agnostic bitflags-style type
  covering the common reset reasons (low-power, window/indep watchdog,
  software, brownout, NRST-pin, option-byte-loader, firewall). Supports
  bit-OR composition and `iter_labels()` for direct log output.
  Unit-tested (empty iter, BitOr, ordered labels).

- `read_and_clear_reset_cause() -> ResetCause` in each MCU's `system.rs`,
  using the *PAC's typed bit accessors* — `csr.sftrstf().bit_is_set()`,
  `w.rmvf().set_bit()`, etc. — rather than raw `read_volatile`/bitmask.
  The PAC verifies at compile time that each named field exists at the
  expected bit position; a renamed or removed field on a PAC update would
  fail the build for the affected MCU instead of silently misreading. The
  ST naming inconsistencies are captured directly in code:

    Flag        | L431            | G431          | G071          | F051
    ------------|-----------------|---------------|---------------|----------
    Low-power   | `lpwrstf`       | `lpwrrstf`    | `lpwrrstf`    | `lpwrrstf`
    Brownout    | `borrstf`       | `borrstf`     | `pwrrstf`     | `porrstf`
    Firewall    | `firewallrstf`  | absent        | absent        | absent

  (F0 has POR/PDR rather than BOR; mapped to `ResetCause::BROWNOUT` as the
  closest portable equivalent. L4 spells `lpwrstf` with single 'r' — ST
  SVD quirk preserved by svd2rust.)

- `mcu.rs` consolidates four `pub use crate::mcu_xxx::chip::*` cfg blocks
  plus four new cfg blocks into a single 4-cfg-line alias: `pub use
  crate::mcu_xxx as active`. All downstream re-exports (`pub use
  active:... (continued)

32 of 44 new or added lines in 1 file covered. (72.73%)

3990 of 6073 relevant lines covered (65.7%)

796.11 hits per line

Uncovered Changes

Lines Coverage ∆ File
12
72.73
rm32/src/reset_cause.rs
Jobs
ID Job ID Ran Files Coverage
1 25648138255.1 11 May 2026 03:06AM UTC 35
65.7
GitHub Action Run
Source Files on build 25648138255
  • Tree
  • List 35
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25648138255
  • bd751ffb on github
  • Prev Build on priv_bringup (#25647031895)
  • Next Build on priv_bringup (#25712469910)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc