PWM Generation using Flex Timer Module(FTM)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

PWM Generation using Flex Timer Module(FTM)

2,451 次查看
karthicksivakum
Contributor I

Hi All,

We are using K70 processor in one of our board and controlling 4 stepper motor using allegro driver IC.

We are generating PWM pulses using FTM module and we found that while we use FTM and generate say 16 pulses with defined width we are getting one extra pulse occasionally. This behavior we found in both low true pulse and high true pulse configuration.

Also we have another issue when we configure as high true pulse instead of clear output on match it behaves like low true pulse(its sets output on match). Please find below the snap shot.

pastedImage_0.png

When we tried to configure it as GPIO and toggle we are not facing any of the above issue, ie we are not getting extra pulse or behaves as intended.

To give the hardware background we are using K70 Processor in one board (control board) and Allegro A4989 drive IC in another board (Motor Driver board).

We have a non inverting buffer 74AC541MTC in control board (in between K70 processor and Allegro Driver).

We have directly connected K70 PWM pin output to buffer (with no pull up/pull resistor at buffer input) and then buffer output connects to driver IC.

Please tell us why we are facing this issue only when we configure the IO pin as FTM and generate PWM but not when we configure as GPIO and toggle.

Thanks for your time.

Karthick

标记 (3)
0 项奖励
回复
2 回复数

1,177 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Karthick,

If you are using Kinetis Design Studio IDE with Processor Expert, I recommand you refer the Typical Usage of Component PPG_LDD.

"Initial polarity is Low, Ratio is 80%" seems meet your case.

If you want generate 16 pulses, use:Iterations before action/event - Number of periods before OnEnd event.

You can use FTMx_OUTMASK to masked the output of Channel. It can force that channel to its inactive state.(in PPG1_OnEnd function)

PPG_LDD generate 16 pulses.png

Best Regards,

Robin

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,177 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

This is the waveform generated by using TWR-K70F120M.

waveform 16 pulses.jpg