Flex Timer use with Comparators

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Flex Timer use with Comparators

ソリューションへジャンプ
951件の閲覧回数
ivekengineer
Contributor III

I want to implement a current controlled chopper using the internal comparator and FlexTimer module for stepper motor control.

I'll explain a simplified version of what I need in order to keep the response focused.


I need two independent PWM channels operating 99% duty cycle.  When an internal comparator output goes active, I need the PWM channel to go to the inactive state for the remainder of the present period, returning to the active state at the zero point.  I initially thought I could do this by using the Fault signals - however, upon closer inspection it appears that any enabled fault condition will affect both channels. Do I understand this correctly?  Is there a way for each channel to be affected by a specific fault signal independently?

If I can't use fault signals, is there some sort of synchronization method I can use?  Perhaps using the comparator outputs as hardware triggers to affect a change of the output mask, and then calling an ISR before the zero point in order to restore the output mask synchronously at the zero point?  However, I would prefer a hardware solution to this instead of using ISRs.


ラベル(1)
タグ(3)
0 件の賞賛
1 解決策
414件の閲覧回数
adriansc
Contributor IV

Hi,

If you are using the same FTMx for two or more channels you will find that these channels have the same frequency (MOD field register) but you can change duty cycle.

Maybe you can check others Application Notes or RM:

http://cache.freescale.com/files/microcontrollers/doc/ref_manual/DRM128.pdf?fsrch=1&sr=1

http://cache.freescale.com/files/32bit/doc/app_note/AN4381.pdf

Hope this helps.

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
414件の閲覧回数
ivekengineer
Contributor III

Let me see if I can ask this in a different way.

I want to implement Current-Limit PWM per 3.1.7 in App Note AN4485 - which is "Using eFlexPWM with MC56F82xx DSC".  It appears to me that the PWM module of the Kinetis does not have all the features of the eFlexPWM?  Specifically, it seems to be lacking independant fault control of individual PWM channels.  For example, I want the FAULT0 signal to disable PWM channels 0 & 1, FAULT1 signal to disable PWM channels 2 & 3, etc., but I don't see how to configure the FlexTimer to do that.

Can anyone help me?


0 件の賞賛
415件の閲覧回数
adriansc
Contributor IV

Hi,

If you are using the same FTMx for two or more channels you will find that these channels have the same frequency (MOD field register) but you can change duty cycle.

Maybe you can check others Application Notes or RM:

http://cache.freescale.com/files/microcontrollers/doc/ref_manual/DRM128.pdf?fsrch=1&sr=1

http://cache.freescale.com/files/32bit/doc/app_note/AN4381.pdf

Hope this helps.

0 件の賞賛