embassy-rs/embassy · error
does not support use as a time driver on this chip yet…
Error message
{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. What it means
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.
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).
Example fix
# before features = ["stm32n657xx", "time-driver-lptim1"] # after features = ["stm32n657xx", "time-driver-any"]
Defensive patterns
Strategy: validation
Validate before calling
// Don't select LPTIM as time driver on STM32N6: // features = ["stm32n657xx", "time-driver-any"]
Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Multiple time-driver-xxx Cargo features enabled
- time-driver-any requested, but the chip doesn't have a TIM…
- Multiple time-driver-xxx Cargo features enabled
- unknown time_driver
- Multiple stm32xx Cargo features enabled
AI-assisted analysis of embassy-rs/embassy@463a07b963 (2026-09-10).
Data as JSON: /api/errors/2991def1d5cf7a3a.
Report an issue: GitHub.
Appendix: source
Thrown at embassy-stm32/build.rs:413
let time_driver_irq_decl = if !time_driver_singleton.is_empty() {
cfgs.set(format!("time_driver_{}", time_driver_singleton.to_lowercase()), true);
let Some((p, regs)) = peripheral_map.get(time_driver_singleton.as_str()) else {
panic!("Tried to select {time_driver_singleton}, which is not available on this device");
};
// Tell the time driver how wide the timer's counter is.
if regs.kind == "timer" {
cfgs.enable(if regs.block == "TIM_GP32" {
"time_driver_32bit"
} else {
"time_driver_16bit"
});
}
if regs.kind == "lptim" && regs.version == "n6" {
panic!(
"{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."
);
}
let irqs: BTreeSet<_> = p
.interrupts
.iter()
.filter(|i| i.signal == "CC" || i.signal == "UP" || i.signal == "GLOBAL")
.map(|i| i.interrupt.to_ascii_uppercase())
.collect();
irqs.iter()
.map(|i| {
let irq = format_ident!("{}", i);
quote! {
#[cfg(feature = "rt")]View on GitHub (pinned to 463a07b963)