Cargo Features
[dependencies]
stm32-hal2 = { version = "2.1.9", default-features = false, features = ["f3rt", "f4rt", "l4rt", "l5rt", "g0rt", "g4rt", "h5rt", "h7rt", "wbrt", "wlrt", "c0rt", "f301", "f302", "f303", "f373", "f3x4", "f401", "f405", "f407", "f410", "f411", "f412", "f413", "f427", "f429", "f446", "f469", "l4x1", "l4x2", "l412", "l4x3", "l4x5", "l4x6", "l552", "l562", "g030", "g031", "g041", "g050", "g051", "g061", "g070", "g071", "g081", "g0b0", "g0b1", "g0c1", "g431", "g441", "g471", "g473", "g474", "g483", "g484", "g491", "g4a1", "h503", "h562", "h563", "h573", "h735", "h743", "h743v", "h747cm4", "h747cm7", "h753", "h753v", "h7b3", "wb55", "wle5", "c011", "c031", "c071", "usb", "usbotg_fs", "usbotg_hs", "can_bx", "can_fd_g", "can_fd_h", "net", "embedded_hal", "monotonic", "defmt", "f", "l", "c_g0", "f3", "f4", "l4", "l5", "g0", "g4", "h5", "h7", "wb", "wl", "c0"] }
Compile with one of these "runtime" features if the program will be directly flashed to an MCU; ie not a library.
- default = defmt
-
The
defmtfeature is set by default wheneverstm32-hal2is added withoutsomewhere in the dependency tree.default-features = false - f3rt
-
Peripheral Access Crates
- f4rt
- l4rt
- l5rt
- g0rt
- g4rt
- h5rt
- h7rt
- wbrt
- wlrt
- c0rt
- f301 = f3
-
Features defined here are those taken from the SVD-generated STM32 PACs. The "f3" etc designator at the end lets us group by family when feature-gating.
- f302 = f3
- f303 = f3
- f373 = f3
- f3x4 = f3
- f401 = f4
-
- f405 = f4
- f407 = f4
- f410 = f4
- f411 = f4
- f412 = f4
- f413 = f4
- f427 = f4
- f429 = f4
- f446 = f4
- f469 = f4
- l4x1 = l4
-
- l4x2 = l4
- l412 = l4
-
L412 is the same as L4x2, but with an RTC like in G0, G4 and L5.
- l4x3 = l4
- l4x5 = l4
-
Affects
baseline::Clocks.pllsai2… - l4x6 = l4
-
Affects
baseline::Clocks.pllsai2… - l552 = l5
-
todo: Handle l4+ (P, R, S, Q)
- l562 = l5
- g030 = g0
-
- g031 = g0
- g041 = g0
- g050 = g0
- g051 = g0
- g061 = g0
- g070 = g0
- g071 = g0
- g081 = g0
- g0b0 = g0
- g0b1 = g0
- g0c1 = g0
- g431 = g4
-
- g441 = g4
- g471 = g4
- g473 = g4
-
Affects
comp::Hysterisis,comp::CompDevice,comp::CompConfig,comp::NonInvertingInput,comp::OutputPolarity,comp::InvertingInput,flash::Flash.dual_bank… - g474 = g4
-
Affects
flash::Flash.dual_bank… - g483 = g4
-
Affects
flash::Flash.dual_bank… - g484 = g4
-
Affects
flash::Flash.dual_bank… - g491 = g4
- g4a1 = g4
- h503 = h5
- h562 = h5
- h563 = h5
- h573 = h5
- h735 = h7
-
- h743 = h7
- h743v = h7
-
Enables stm32h743v of stm32h7
- h747cm4 = h7
-
Enables stm32h747cm4 of stm32h7
Affects
stm32-hal2::power… - h747cm7 = h7
-
Enables stm32h747cm7 of stm32h7
Affects
stm32-hal2::power… - h753 = h7
- h753v = h7
-
Enables stm32h753v of stm32h7
- h7b3 = h7
- wb55 = wb
-
- wle5 = wl
-
- c011 = c0
-
- c031 = c0
- c071 = c0
-
Affects
baseline::Clk48Src,baseline::SysDiv,baseline::Clocks.sys_div… - usb
-
Enables stm32-usbd
These USB and CAN crates are only imported if one of the
can,usb,usbotg_fs, orusbotg_hsfeatures are used. Workaround using a fork of stm32-usbd until the main one is released on crates.These three for non-synopsis. todo: Add in for synopsis, along with our write helper, if applicable.
- usbotg_fs
-
eg F4 for FS.
Enables fs of synopsys-usb-otg ^0.4.0
- usbotg_hs
-
eg H7 for HS.
Enables hs of synopsys-usb-otg ^0.4.0
- can_bx
-
Enables bxcan
- can_fd_g
-
Enables fdcan_g0_g4_l5 of fdcan
fdcan:
Peripheral map found on G0 G4 L5
- can_fd_h
-
fdcan:
Peripheral map found on H7
- net
-
Enables smoltcp
TCP stack for use with the Ethernet peripheral.
Affects
stm32-hal2::ethernet… - embedded_hal
-
Enables embedded-hal and embedded-io ^0.6.1
embedded-hal:
Embedded-HAL traits and related libs. Featured-gated with
embedded-hal. - monotonic
-
Enables rtic-monotonic
Enabled with the
monotonicfeature. - defmt default
-
Enables defmt
- f f3? f4?
-
These features are used to featured gate sections of code that apply to an entire family.
- l l4? l5?
- c_g0 c0? g0?
-
todo: A/R
- f3 f301? f302? f303? f373? f3x4? = f
-
Affects
f::Prediv,f::PllMul,f::UsbPrescaler,f::Clocks.prediv,f::Clocks.pll_mul,f::Clocks.usb_pre,util::RccPeriph.read_chan,util::RccPeriph.write_chan… - f4 f401? f405? f407? f410? f411? f412? f413? f427? f429? f446? f469? = f
-
Affects
f::Pllp,f::Pllq,f::Clocks.pllm,f::Clocks.plln,f::Clocks.pllp,f::Clocks.pllq,stm32-hal2::i2c_f4… - l4 l412? l4x1? l4x2? l4x3? l4x5? l4x6? = l
-
Affects
comp::PowerMode,comp::NonInvertingInput,comp::OutputPolarity,comp::CompConfig,util::RccPeriph.read_sel,util::RccPeriph.write_sel,comp::Hysterisis,low_power::low_power_run,low_power::return_from_low_power_run,util::RccPeriph.read_chan,util::RccPeriph.write_chan,comp::InvertingInput,usb::enable_usb_pwr,baseline::CrsSyncSrc,baseline::StopWuck,baseline::Clocks.stop_wuck,baseline::enable_crs… - l5 l552? l562? = l
-
Affects
baseline::Pllm,low_power::low_power_run,low_power::return_from_low_power_run,gpio::clear_exti_interrupt,usb::enable_usb_pwr,baseline::CrsSyncSrc,baseline::StopWuck,baseline::Clocks.stop_wuck,baseline::enable_crs,flash::Flash.dual_bank… - g0 g030? g031? g041? g050? g051? g061? g070? g071? g081? g0b0? g0b1? g0c1? = c_g0
-
Affects
dma::DmaInput,baseline::Pllr,baseline::CanSrc,baseline::Clocks.can_src,baseline::PllSrc,gpio::clear_exti_interrupt,usb::enable_usb_pwr… - g4 g431? g441? g471? g473? g474? g483? g484? g491? g4a1?
-
Affects
baseline::Clocks.boost_mode,dac::Trigger,dac::WaveGeneration,dac::SawtoothDirection,dac::SawtoothConfig,dac::HighFrequencyMode,dac::DacConfig.hfsel,baseline::Pllm,baseline::CanSrc,baseline::Clocks.can_src,dma::enable_mux1,usart::UsartConfig.fifo_enabled,baseline::PllSrc,baseline::CrsSyncSrc,baseline::enable_crs… - h5 h503? h562? h563? h573?
- h7 h735? h743? h743v? h747cm4? h747cm7? h753? h753v? h7b3?
-
Affects
adc::Align,h::Clocks.d1_core_prescaler,h::Clocks.d3_prescaler,dac::Trigger,dma::DmaInput,dma::DmaInput2,dma::DmaChannel,dma::mux2,comp::NonInvertingInput,comp::Hysterisis,comp::OutputPolarity,stm32-hal2::ethernet,usart::UsartConfig.fifo_enabled,comp::InvertingInput… - wb wb55?
-
Affects
baseline::RfWakeupSrc,baseline::Clocks.hclk2_prescaler,baseline::Clocks.hclk4_prescaler,baseline::Clocks.rf_wakeup_src,dma::DmaInput,stm32-hal2::hsem,stm32-hal2::ipcc,baseline::Pllr,dma::enable_mux1,baseline::CrsSyncSrc,baseline::StopWuck,baseline::Clocks.stop_wuck,baseline::enable_crs… - wl wle5?
-
Affects
baseline::Clocks.hclk3_prescaler,dma::DmaInput,baseline::StopWuck,baseline::Clocks.stop_wuck… - c0 c011? c031? c071? = c_g0
-
Affects
baseline::HsiDiv,baseline::Clocks.hsi_div,baseline::PllSrc,gpio::clear_exti_interrupt…
Features from optional dependencies
In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
- stm32f3 f301? f302? f303? f373? f3rt? f3x4?
- stm32f4 f401? f405? f407? f410? f411? f412? f413? f427? f429? f446? f469? f4rt?
- stm32l4 l412? l4rt? l4x1? l4x2? l4x3? l4x5? l4x6?
- stm32l5 l552? l562? l5rt?
- stm32g0 g030? g031? g041? g050? g051? g061? g070? g071? g081? g0b0? g0b1? g0c1? g0rt?
- stm32g4 g431? g441? g471? g473? g474? g483? g484? g491? g4a1? g4rt?
- stm32h5 h503? h562? h563? h573? h5rt?
- stm32h7 h735? h743? h743v? h747cm4? h747cm7? h753? h753v? h7b3? h7rt?
- stm32wb wb55? wbrt?
- stm32wl wle5? wlrt?
- stm32c0 c011? c031? c071? c0rt?
- synopsys-usb-otg usbotg_fs? usbotg_hs?
-
Enables synopsys-usb-otg ^0.4.0
- fdcan can_fd_g? can_fd_h?