Embassy
embassy-stm32

Crates

git

Versions

stm32h755xi-cm4

Flavors

Struct embassy_stm32::hrtim::BridgeConverter

source ·
pub struct BridgeConverter<T: Instance, C: AdvancedChannel<T>> { /* private fields */ }
Expand description

Fixed-frequency bridge converter driver.

Our implementation of the bridge converter uses a single channel and three compare registers, allowing implementation of a synchronous buck or boost converter in continuous or discontinuous conduction mode.

It is important to remember that in synchronous topologies, energy can flow in reverse during light loading conditions, and that the low-side switch must be active for a short time to drive a bootstrapped high-side switch.

Implementations§

source§

impl<T: Instance, C: AdvancedChannel<T>> BridgeConverter<T, C>

source

pub fn new(_channel: C, frequency: Hertz) -> Self

Create a new HRTIM bridge converter driver.

source

pub fn start(&mut self)

Start HRTIM.

source

pub fn stop(&mut self)

Stop HRTIM.

source

pub fn enable_burst_mode(&mut self)

Enable burst mode.

source

pub fn disable_burst_mode(&mut self)

Disable burst mode.

source

pub fn set_dead_time(&mut self, dead_time: u16)

Set the dead time as a proportion of the maximum compare value

source

pub fn get_max_compare_value(&mut self) -> u16

Get the maximum compare value of a duty cycle

source

pub fn set_primary_duty(&mut self, primary_duty: u16)

The primary duty is the period in which the primary switch is active

In the case of a buck converter, this is the high-side switch In the case of a boost converter, this is the low-side switch

source

pub fn set_secondary_duty(&mut self, secondary_duty: u16)

The secondary duty is the period in any switch is active

If less than or equal to the primary duty, the secondary switch will be active for one tick If a fully complementary output is desired, the secondary duty can be set to the max compare

Auto Trait Implementations§

§

impl<T, C> Freeze for BridgeConverter<T, C>

§

impl<T, C> RefUnwindSafe for BridgeConverter<T, C>

§

impl<T, C> Send for BridgeConverter<T, C>
where T: Send, C: Send,

§

impl<T, C> Sync for BridgeConverter<T, C>
where T: Sync, C: Sync,

§

impl<T, C> Unpin for BridgeConverter<T, C>
where T: Unpin, C: Unpin,

§

impl<T, C> UnwindSafe for BridgeConverter<T, C>
where T: UnwindSafe, C: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.