KV44 flexPWM with frequency dithering and nano edge

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KV44 flexPWM with frequency dithering and nano edge

Jump to solution
1,660 Views
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 Kudos
Reply
1 Solution
1,626 Views
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

 

View solution in original post

3 Replies
1,637 Views
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 Kudos
Reply
1,627 Views
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,583 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @katha 

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

Diego.

0 Kudos
Reply