embassy-rs/embassy · error

' ' feature invalid for this chip! No pin ' ' found. Found…

Error message

'{}' feature invalid for this chip! No pin '{}' found.

 Found pins: {:#?}

What it means

Some STM32 pins are split across ports (e.g. PC13/PC14 style split features). The build script validates each requested split feature against the chip's actual pin set; if the pin referenced by the split feature does not exist on this chip, it panics listing the feature name, pin, and all found pins.

Solutions

  1. Remove the invalid split-pin feature from embassy-stm32's features list
  2. Pick the correct split feature matching a pin that exists on your chip (compare against the 'Found pins' list in the panic output)
  3. Use the chip's default pin definition instead of the split feature if the split is unnecessary

Example fix

# before
features = ["stm32wl55jc", "split-pa2-pa3"] // pin not on this chip
# after
features = ["stm32wl55jc"] // rely on default pin mapping, or use a valid split feature
Defensive patterns

Strategy: validation

Validate before calling

# confirm the split-pin feature's pin exists on your chip before enabling
# check the panic's 'Found pins' list or the chip metadata in embassy-stm32

Prevention

When it happens

Trigger: Enabling a pin-split Cargo feature (e.g. a feature that remaps PAxx/PCxx pin-name-with-c) whose target pin is absent from the selected chip's pin database during build script pin enumeration.

Common situations: Copying features from a different chip's example; typo/mismatch between chip feature and split-pin feature; upgrading embassy-stm32 where the pin database changed for your chip.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of embassy-rs/embassy@463a07b963 (2026-09-10). Data as JSON: /api/errors/412d5ef51e5cf11b. Report an issue: GitHub.

Appendix: source

Thrown at embassy-stm32/build.rs:335

        #[cfg(feature = "split-pc2")]
        SplitFeature {
            feature_name: "split-pc2".to_string(),
            pin_name_with_c: "PC2_C".to_string(),
            pin_name_without_c: "PC2".to_string(),
        },
        #[cfg(feature = "split-pc3")]
        SplitFeature {
            feature_name: "split-pc3".to_string(),
            pin_name_with_c: "PC3_C".to_string(),
            pin_name_without_c: "PC3".to_string(),
        },
    ];

    for split_feature in &split_features {
        if pin_set.contains(split_feature.pin_name_with_c.as_str()) {
            singletons.push(split_feature.pin_name_with_c.clone());
        } else {
            panic!(
                "'{}' feature invalid for this chip! No pin '{}' found.\n
                Found pins: {:#?}",
                split_feature.feature_name, split_feature.pin_name_with_c, pin_set
            )
        }
    }

    // ========
    // Handle time-driver-XXXX features.

    let time_driver = match env::vars()
        .map(|(a, _)| a)
        .filter(|x| x.starts_with("CARGO_FEATURE_TIME_DRIVER_"))
        .get_one()
    {
        Ok(x) => Some(
            x.strip_prefix("CARGO_FEATURE_TIME_DRIVER_")
                .unwrap()

View on GitHub (pinned to 463a07b963)