Cargo Features
stm32-hal2 has no features set by default.
[dependencies]
stm32-hal2 = { version = "1.8.4", features = ["f3rt", "f4rt", "l4rt", "l5rt", "g0rt", "g4rt", "h7rt", "wbrt", "wlrt", "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", "h735", "h743", "h743v", "h747cm4", "h747cm7", "h753", "h753v", "h7b3", "wb55", "wle5", "usb", "usbotg_fs", "usbotg_hs", "can_bx", "can_fd_g", "can_fd_h", "net", "embedded_hal", "monotonic", "f3", "f4", "l4", "l5", "g0", "g4", "h5", "h7", "wb", "wl"] }
Compile with one of these "runtime" features if the program will be directly flashed to an MCU; ie not a library.
- f3rt
-
Peripheral Access Crates
- f4rt
- l4rt
- l5rt
- g0rt
- g4rt
- h7rt
- wbrt
- wlrt
- 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
,stm32-hal2::comp
,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
- 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
-
- usb
-
Enables stm32-usbd2
These USB and CAN crates are only imported if one of the
can
,usb
,usbotg_fs
, orusbotg_hs
features are used. Workaround using a fork of stm32-usbd until the main one is released on crates. - usbotg_fs
-
eg F4 for FS.
Enables fs of synopsys-usb-otg ^0.3.2
- usbotg_hs
-
eg H7 for HS.
Enables hs of synopsys-usb-otg ^0.3.2
- can_bx
-
Enables bxcan ^0.7.0
- 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 ^0.8.1
TCP stack for use with the Ethernet peripheral.
Affects
stm32-hal2::ethernet
… - embedded_hal
-
Enables embedded-hal
Embedded-HAL traits and related libs. Featured-gated with
embedded-hal
. - monotonic
-
Enables rtic-monotonic
Enabled with the
monotonic
feature. - f3 f301? f302? f303? f373? f3x4?
-
These features are used to featured gate sections of code that apply to an entire family.
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?
-
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?
-
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
,stm32-hal2::comp
,usb::enable_usb_pwr
,baseline::CrsSyncSrc
,baseline::StopWuck
,baseline::Clocks.stop_wuck
,baseline::enable_crs
… - l5 l552? l562?
-
Affects
baseline::Pllm
,low_power::low_power_run
,low_power::return_from_low_power_run
,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?
-
Affects
baseline::PllSrc
,baseline::Pllr
,baseline::CanSrc
,baseline::Clocks.can_src
,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::PllSrc
,baseline::Pllm
,baseline::CanSrc
,baseline::Clocks.can_src
,dma::enable_mux1
,usart::UsartConfig.fifo_enabled
,baseline::CrsSyncSrc
,baseline::enable_crs
… - h5
- 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::cfg_channel
,dma::mux2
,comp::NonInvertingInput
,comp::Hysterisis
,comp::OutputPolarity
,stm32-hal2::ethernet
,usart::UsartConfig.fifo_enabled
,comp::InvertingInput
,stm32-hal2::comp
… - wb wb55?
-
Affects
baseline::RfWakeupSrc
,baseline::Clocks.hclk2_prescaler
,baseline::Clocks.hclk4_prescaler
,baseline::Clocks.rf_wakeup_src
,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
…
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?
- stm32h7 h735? h743? h743v? h747cm4? h747cm7? h753? h753v? h7b3? h7rt?
- stm32wb wb55? wbrt?
- stm32wl wle5? wlrt?
- synopsys-usb-otg usbotg_fs? usbotg_hs?
-
Enables synopsys-usb-otg ^0.3.2
- fdcan can_fd_g? can_fd_h?