pub struct DeadTimeCfg { /* private fields */ }Expand description
Configuration for MCPWM Operator DeadTime It’s recommended to reference the technical manual for configuration
Implementations§
Source§impl DeadTimeCfg
impl DeadTimeCfg
Sourcepub const fn new_bypass() -> DeadTimeCfg
pub const fn new_bypass() -> DeadTimeCfg
Uses the following configuration:
- Clock: PWM_clk
- Bypass: A & B
- Inputs: A->A, B->B (InSel)
- Outputs: A->A, B->B (OutSwap)
- No Dual-edge B
- No Invert
- FED/RED update mode = immediate
Sourcepub const fn new_ahc() -> DeadTimeCfg
pub const fn new_ahc() -> DeadTimeCfg
Active High Complementary (AHC) from Technical Reference manual
Will generate a PWM from input PWMA, such that output PWMA & PWMB are each others complement except during a transition in which they will be both off (as deadtime) such that they should never overlap, useful for H-Bridge type scenarios
Sourcepub const fn invert_output(self, fed: bool, red: bool) -> Self
pub const fn invert_output(self, fed: bool, red: bool) -> Self
Sets FED/RED output inverter Inverts the output of the FED/RED module (excl DEB mode feedback)
Sourcepub const fn set_output_swap(self, stream: PWMStream, swap: bool) -> Self
pub const fn set_output_swap(self, stream: PWMStream, swap: bool) -> Self
Swaps the output of a PWM Stream i.e. If both streams have output_swap enabled, the output of the module is swapped, while if only one is enabled that one ‘copies’ from the other stream
Sourcepub const fn set_bypass(self, stream: PWMStream, enable: bool) -> Self
pub const fn set_bypass(self, stream: PWMStream, enable: bool) -> Self
Set PWMA/PWMB stream to bypass everything except output_swap This means no deadtime is applied when enabled
Sourcepub const fn select_clock(self, pwm_clock: bool) -> Self
pub const fn select_clock(self, pwm_clock: bool) -> Self
Select Between PWMClk & PT_Clk
Sourcepub const fn select_input(self, fed: PWMStream, red: PWMStream) -> Self
pub const fn select_input(self, fed: PWMStream, red: PWMStream) -> Self
Select which stream is used for the input of FED/RED
Trait Implementations§
Source§impl Clone for DeadTimeCfg
Available on crate feature unstable only.
impl Clone for DeadTimeCfg
unstable only.Source§fn clone(&self) -> DeadTimeCfg
fn clone(&self) -> DeadTimeCfg
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DeadTimeCfg
unstable only.