PWM period

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
rvanspaa
Posts: 10
Joined: Mon Apr 24, 2017 7:51 am

PWM period

Postby rvanspaa » Sat Oct 07, 2017 6:14 am

Hi,

There is a "period" in PWMDriver and also in PWMConfig. Could someone please explain why there are two, and if they are different, what the difference is, and why there is none in PWMChannelConfig?

Regards,

rvanspaa

User avatar
Giovanni
Site Admin
Posts: 10134
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 205 times
Been thanked: 183 times
Contact:

Re: PWM period

Postby Giovanni » Sat Oct 07, 2017 9:31 am

Hi,

The one in PWMDriver is an internal variable, the one in PWMConfig is the period you set initially.

Channels do not have their own period because all channels share the same period.

Giovanni

rvanspaa
Posts: 10
Joined: Mon Apr 24, 2017 7:51 am

Re: PWM period

Postby rvanspaa » Sat Oct 07, 2017 11:20 pm

Hi Giovanni,

Thanks for the explanation, but I'm afraid it just leaves me with more questions. Could you please define "channel", and explain it's association with pins?

Regards,

rvanspaa

User avatar
Giovanni
Site Admin
Posts: 10134
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 205 times
Been thanked: 183 times
Contact:

Re: PWM period

Postby Giovanni » Sun Oct 08, 2017 6:13 am

Hi,

Channels are explained in the STM32 Reference Manual, see TIMx chapters. Pin associations are documented in the STM32 data sheet.

Giovanni

rvanspaa
Posts: 10
Joined: Mon Apr 24, 2017 7:51 am

Re: PWM period

Postby rvanspaa » Mon Oct 09, 2017 12:48 am

Hi Giovanni,

Thanks.


Return to “ChibiOS/HAL”

Who is online

Users browsing this forum: No registered users and 1 guest