KV44 flexPWM with frequency dithering and nano edge

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

KV44 flexPWM with frequency dithering and nano edge

跳至解决方案
1,299 次查看
katha
Contributor II

Hello everybody,

to realize a spread spectrum frequency modulation with two pwm signals and nano edge placement I currently vary the periode using VAL1. Frequency varies between 105kHz - 95kHz, nanoedge 2x clock runs at 168MHz.

I realized, that the periode setting with VAL1 seems to be non linear. Also the dutycycle values doesn't seem to vary linear. If I use SDK function PWM_UpdatePwmDutycycle() the dutycycle does not come out exactly.

Could you explain why the values are non linear?
Do you have a better idea how to realize a frequency dithering feature?

Many thanks

Katharina

0 项奖励
1 解答
1,265 次查看
katha
Contributor II

Hie Diego,

got it working, dithering function does not work for a frequency dithering from 95kHz to 100kHz, just around the nearest whole number.

Non linearity was because of rounding problems.

Regards

 

在原帖中查看解决方案

3 回复数
1,276 次查看
diego_charles
NXP TechSupport
NXP TechSupport

Hi @katha 

I hope you are doing well!

Could you detail us  further the non-linear variations that you are seeing for the duty cycle and PWM period?  For example , when you call PWM_UpdatePwmDutycycle()  to  increment/decrease/set the duty cycle , the error in the duty cycle edges can vary in many  different clock cycles?

Our colleague Xiangjun Ron  provides a document and demo code introducing the Nano-edge placement. To get fine edge control the period the FRACVAL registers are also used.   Nano-edge placement feature for eFlexPWM module based on KV4x

According to the KV44, the fine edge control , can be also simulated with dithering, this applies for those sub-modules that are not supported by the Nano edge placer.  

diego_charles_0-1631745887108.png

All the best

Diego.

 

0 项奖励
1,266 次查看
katha
Contributor II

Hie Diego,

got it working, dithering function does not work for a frequency dithering from 95kHz to 100kHz, just around the nearest whole number.

Non linearity was because of rounding problems.

Regards

 

1,222 次查看
diego_charles
NXP TechSupport
NXP TechSupport

Hi @katha 

I am glad that you have find out the problem! Thanks for sharing. 

Diego.

0 项奖励