{"record":{"id":"2991def1d5cf7a3a","repo":"embassy-rs/embassy","slug":"time-driver-singleton-does-not-support-use-as-a","errorCode":null,"errorMessage":"{time_driver_singleton} does not support use as a time driver on this chip yet: N6's LPTIM register layout (split isr_output/dier_output/icr_output registers) and RCC clock-mux selection are not yet implemented for the time driver. Select a TIM-based time driver (e.g. time-driver-any) instead.","messagePattern":"(.+?) does not support use as a time driver on this chip yet: N6's LPTIM register layout \\(split isr_output/dier_output/icr_output registers\\) and RCC clock-mux selection are not yet implemented for the time driver\\. Select a TIM-based time driver \\(e\\.g\\. time-driver-any\\) instead\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"embassy-stm32/build.rs","lineNumber":413,"sourceCode":"\n    let time_driver_irq_decl = if !time_driver_singleton.is_empty() {\n        cfgs.set(format!(\"time_driver_{}\", time_driver_singleton.to_lowercase()), true);\n\n        let Some((p, regs)) = peripheral_map.get(time_driver_singleton.as_str()) else {\n            panic!(\"Tried to select {time_driver_singleton}, which is not available on this device\");\n        };\n\n        // Tell the time driver how wide the timer's counter is.\n        if regs.kind == \"timer\" {\n            cfgs.enable(if regs.block == \"TIM_GP32\" {\n                \"time_driver_32bit\"\n            } else {\n                \"time_driver_16bit\"\n            });\n        }\n\n        if regs.kind == \"lptim\" && regs.version == \"n6\" {\n            panic!(\n                \"{time_driver_singleton} does not support use as a time driver on this chip yet: N6's LPTIM \\\n                 register layout (split isr_output/dier_output/icr_output registers) and RCC clock-mux \\\n                 selection are not yet implemented for the time driver. Select a TIM-based time driver \\\n                 (e.g. time-driver-any) instead.\"\n            );\n        }\n        let irqs: BTreeSet<_> = p\n            .interrupts\n            .iter()\n            .filter(|i| i.signal == \"CC\" || i.signal == \"UP\" || i.signal == \"GLOBAL\")\n            .map(|i| i.interrupt.to_ascii_uppercase())\n            .collect();\n\n        irqs.iter()\n            .map(|i| {\n                let irq = format_ident!(\"{}\", i);\n                quote! {\n                    #[cfg(feature = \"rt\")]","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/embassy-rs/embassy/blob/463a07b963419a1bfe61d5d597c44acb810afb8b/embassy-stm32/build.rs#L395-L431","documentation":"The build script rejects LPTIM as a time driver on STM32N6 because the N6 LPTIM register layout (split isr_output/dier_output/icr_output registers) and its RCC clock-mux selection are not implemented in embassy-stm32's time driver. Selecting an LPTIM time-driver feature on an N6 target deliberately panics in build.rs instead of generating broken code.","triggerScenarios":"Building for an STM32N6 target with a time-driver feature that resolves to an LPTIM instance (regs.kind == \"lptim\" && regs.version == \"n6\"), e.g. `time-driver-lptim1` instead of a TIM-based driver.","commonSituations":"Users of STM32N6 who assumed LPTIM works like on other families; copying configs from other chips; trying low-power timers specifically for stop-mode timekeeping.","solutions":["Use `time-driver-any` or an explicit TIM-based feature (e.g. `time-driver-tim2`) so a regular timer is selected.","If LPTIM is required, file/watch an upstream embassy issue for N6 LPTIM time-driver support rather than patching features.","As a workaround, patch embassy-stm32 to add N6 LPTIM support in the time driver (register layout + RCC mux)."],"exampleFix":"# before\nfeatures = [\"stm32n657xx\", \"time-driver-lptim1\"]\n# after\nfeatures = [\"stm32n657xx\", \"time-driver-any\"]","handlingStrategy":"validation","validationCode":"// Don't select LPTIM as time driver on STM32N6:\n// features = [\"stm32n657xx\", \"time-driver-any\"]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["On N6, always use TIM-based or `time-driver-any` features.","Read the target chip's supported-feature notes before choosing time-driver features.","Watch upstream embassy release notes for N6 LPTIM time-driver support."],"tags":["build-script","stm32","unsupported-hardware","time-driver"],"backgroundTag":"unsupported-operation","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"}