aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorxoviat <[email protected]>2023-06-29 21:05:41 -0500
committerxoviat <[email protected]>2023-06-30 18:22:01 -0500
commit8c4997c5fcd8c25d68865b9e7537e0add50eac24 (patch)
treed7279804ee412d44b34fcc08ea092f49f3ec2781 /examples
parent3252eaa060d8efb79f99511ac40a26be9cf287f9 (diff)
stm32/hrtim: impl. bridge, dead-time part. res.
Diffstat (limited to 'examples')
-rw-r--r--examples/stm32f334/src/bin/pwm.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/stm32f334/src/bin/pwm.rs b/examples/stm32f334/src/bin/pwm.rs
index cc2ea8617..20a621372 100644
--- a/examples/stm32f334/src/bin/pwm.rs
+++ b/examples/stm32f334/src/bin/pwm.rs
@@ -31,16 +31,17 @@ async fn main(_spawner: Spawner) {
31 None, 31 None,
32 ); 32 );
33 33
34 pwm.set_dead_time(0);
35
36 let mut buck_converter = BridgeConverter::new(pwm.ch_a, khz(100)); 34 let mut buck_converter = BridgeConverter::new(pwm.ch_a, khz(100));
37 35
38 buck_converter.set_duty(0, u16::MAX); 36 buck_converter.set_primary_duty(0);
37 buck_converter.set_secondary_duty(0);
38 buck_converter.set_dead_time(0);
39 39
40 // note: if the pins are not passed into the advanced pwm struct, they will not be output 40 // note: if the pins are not passed into the advanced pwm struct, they will not be output
41 let mut boost_converter = BridgeConverter::new(pwm.ch_b, khz(100)); 41 let mut boost_converter = BridgeConverter::new(pwm.ch_b, khz(100));
42 42
43 boost_converter.set_duty(0, 0); 43 boost_converter.set_primary_duty(0);
44 boost_converter.set_secondary_duty(0);
44 45
45 // let max = pwm.get_max_duty(); 46 // let max = pwm.get_max_duty();
46 // pwm.set_dead_time(max / 1024); 47 // pwm.set_dead_time(max / 1024);