stm32f0xx-hal icon indicating copy to clipboard operation
stm32f0xx-hal copied to clipboard

Continue Improvements to PWM Interface

Open AdinAck opened this issue 1 year ago • 2 comments

Motivation

Now that the interface to create complementary PWM channels is exposed, it should include controlling the dead time as well.

Change(s) Description

  • Add set_dead_time function to complementary channels, provided by the ComplementaryPwm trait
  • Fix typo in set up of complementary channels

Testing

It works.

Limitations

The implementation I've made for now does not include any of the fancy multiplier capabilities the BDTR register provides. This only allows the dead time to be from 0-7 clock cycles.

Future

  • I hope to add an interface for setting PWM channels (complementary or not) to be center aligned.
  • More examples

AdinAck avatar Aug 18 '23 01:08 AdinAck

Would you please rebase the PR to get rid of the merge (and maybe some of the intermediate sausage making)?

therealprof avatar Sep 30 '23 21:09 therealprof

#170 will fix this PR.

AdinAck avatar Nov 25 '23 16:11 AdinAck