Skip to content

mspm0: add simple pwm driver - #6612

Open
Iooon wants to merge 1 commit into
embassy-rs:mainfrom
Iooon:mspm0-simple-pwm
Open

mspm0: add simple pwm driver#6612
Iooon wants to merge 1 commit into
embassy-rs:mainfrom
Iooon:mspm0-simple-pwm

Conversation

@Iooon

@Iooon Iooon commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

The implementation is based on the stm32 simple_pwm API and implemented against the TI MSPM0 SDK register sequence.

  • Up to 4 CCP channels per timer, each with a PwmPin
  • Edge-aligned and center-aligned counting modes
  • Configurable frequency and clock source (LFCLK / MFCLK)
  • Per-channel duty cycle: raw, fraction, percent, fully on/off
  • Per-channel enable/disable and output polarity
  • embedded-hal SetDutyCycle impl
  • Examples for mspm0g3507 and mspm0l1306 (the boards I can test with)

@i509VCB

i509VCB commented Jul 26, 2026

Copy link
Copy Markdown
Member

Give me a few days to get some info about the pwm driver I've already written. Hopefully can release it in a few days.

@i509VCB i509VCB added the e-mspm0 Issues for the MSPM0 family of chips label Jul 26, 2026
@Iooon

Iooon commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Give me a few days to get some info about the pwm driver I've already written. Hopefully can release it in a few days.

Ah damn, sorry. I probably should have checked. Did not want to double the work.

@i509VCB

i509VCB commented Jul 26, 2026

Copy link
Copy Markdown
Member

Give me a few days to get some info about the pwm driver I've already written. Hopefully can release it in a few days.

Ah damn, sorry. I probably should have checked. Did not want to double the work.

The pwm driver in my case also allows 32-bit counting (if timer supports it) and building a 2/4 channel version. Probably also good to have this as a reference to make sure I didn't miss anything.

Edit: also completely type erased T out of the SimplePwmChannel type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e-mspm0 Issues for the MSPM0 family of chips

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants