S32K SKD - PWM

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

S32K SKD - PWM

3,258 次查看
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,921 次查看
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,921 次查看
radekpivokonsky
Contributor I

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

Best Regards,

Radek

0 项奖励
回复