S32K SKD - PWM

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

S32K SKD - PWM

3,257件の閲覧回数
radekpivokonsky
Contributor I

Hi,

I've started to setup the PWM outputs over FTM timers. When I try to set the PWM output with the PWM frequnecy in the range of approx. 80 - 250 Hz, the PWM period is not consistent. It genererates additional pulse among the rest of expected PWM pulses - see attached file. For the project SDK drivers are used (for PWM the FTM_PWM driver is used).

I attached two files, first is the pwm setting file generated by Proc. Expert and second one shows the PWM curve on the osciloscopue.

Please can you explain me what is wrong. If I change PWM period (also PWM prescaler must be changed) e.g. to 1ms, 500us... the period is really precisely set.

Thank you.

Radek

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

2,920件の閲覧回数
razva_tilimpea
NXP Employee
NXP Employee

Hi,

I think the problem is caused by: FTM_UPDATE_NOW. If you try to update the duty cycle the counter will be reset and you won't have fixed frequency.

To avoid this issue please use FTM_WAIT_LOADING_POINTS and enable one of the loading point ( true, /* Max loading point state */). In this set-up no Mather when you update duty the update will be made just after finishing current period.

Best regards,

Razvan

2,920件の閲覧回数
radekpivokonsky
Contributor I

Thank you for your help. Now, all the tested frequencies are precisely set.

Best Regards,

Radek

0 件の賞賛
返信