{"record":{"id":"c1fdee374156a098","repo":"embassy-rs/embassy","slug":"unknown-time-driver","errorCode":null,"errorMessage":"unknown time_driver {:?}","messagePattern":"unknown time_driver (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"embassy-mspm0/build.rs","lineNumber":475,"sourceCode":"            // 4. 16-bit, 4 channel\n            // 5. 16-bit with QEI\n            // 6. Advanced timers\n            //\n            // TODO: 32-bit timers are not considered yet\n            [\n                // basic timers. No PWM pins\n                // \"TIMB0\", // 16-bit, 2 channel\n                \"TIMG0\", \"TIMG1\", \"TIMG2\", \"TIMG3\", // 16-bit, 2 channel with shadow registers\n                \"TIMG4\", \"TIMG5\", \"TIMG6\", \"TIMG7\",  // 16-bit, 4 channel\n                \"TIMG14\", // 16-bit with QEI\n                \"TIMG8\", \"TIMG9\", \"TIMG10\", \"TIMG11\", // Advanced timers\n                \"TIMA0\", \"TIMA1\",\n            ]\n            .iter()\n            .find(|tim| singletons.iter().any(|s| s.name == **tim))\n            .expect(\"Could not find any timer\")\n        }\n        _ => panic!(\"unknown time_driver {:?}\", time_driver),\n    };\n\n    if !selected_timer.is_empty() {\n        cfgs.enable(format!(\"time_driver_{}\", selected_timer.to_lowercase()));\n    }\n\n    // Apply cfgs to each timer and it's pins\n    for singleton in singletons.iter_mut() {\n        if singleton.name.starts_with(\"TIM\") {\n            // Remove suffixes for pin singletons.\n            let name = if singleton.name.contains(\"_CCP\") {\n                singleton.name.split_once(\"_CCP\").unwrap().0\n            } else if singleton.name.contains(\"_FAULT\") {\n                singleton.name.split_once(\"_FAULT\").unwrap().0\n            } else if singleton.name.contains(\"_IDX\") {\n                singleton.name.split_once(\"_IDX\").unwrap().0\n            } else {\n                &singleton.name","sourceCodeStart":457,"sourceCodeEnd":493,"githubUrl":"https://github.com/embassy-rs/embassy/blob/463a07b963419a1bfe61d5d597c44acb810afb8b/embassy-mspm0/build.rs#L457-L493","documentation":"After resolving which `time_driver_*` feature is set, the build script matches its name against the list of supported timers per chip. Any unrecognized value falls into the catch-all `_` arm and panics with `unknown time_driver <name>`, meaning the enabled time-driver feature names a timer the build script doesn't handle for this chip.","triggerScenarios":"Enabling a `time_driver_<timer>` feature whose timer doesn't exist on the selected chip (e.g. `time_driver_timB0` on a part without TIMB0, or `time_driver_tik0` typo), or the `CARGO_FEATURE_TIME_DRIVER_*` env var produced by an unexpected feature name.","commonSituations":"Typos in feature names; copying a time-driver feature from a different MSPM0 family example where that timer singleton isn't generated; using a newer timer feature against an older embassy-mspm0 version that doesn't support it.","solutions":["Use one of the supported time-driver features for your chip (per embassy-mspm0 docs, e.g. time_driver_tima0/time_driver_tima1), or none for the default timer.","Fix typos in the feature name in Cargo.toml.","Verify the timer exists on your exact part and is generated as a singleton (the panic above the match, 'Could not find any timer', guards this for defaults).","Upgrade or downgrade embassy-mspm0 to a version supporting the time-driver feature you want."],"exampleFix":"// before\nfeatures = [\"mspm0g350x\", \"time_driver_timb0\"] // TIMB0 unsupported here\n// after\nfeatures = [\"mspm0g350x\", \"time_driver_tima0\"]","handlingStrategy":"validation","validationCode":"// Only use documented timers for your chip, e.g.:\n// features = [\"mspm0g350x\", \"time_driver_tima0\"]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check the chip's datasheet/singleton list before enabling a time_driver feature.","Avoid hand-typing feature names — copy from embassy-mspm0 docs/Cargo.toml.","Pin embassy-mspm0 to a version whose supported time-driver features you've verified."],"tags":["rust","build-script","cargo-features","time-driver","invalid-value"],"backgroundTag":"invalid-enum-value","analyzedSha":"463a07b963419a1bfe61d5d597c44acb810afb8b","analyzedAt":"2026-09-10T13:38:26.660Z","contentChangedAt":"2026-09-10T13:38:26.660Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}