Problem with PWMSP002

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi,

I have some problems with PWMSP002 1.0.12 (single phase PWM with dead time).

My test board is Relax Kit (XMC4500). PWM frequency is about 500kHz, deadtime (rising and falling) - 300ns, PWM outputs: P0.0 and P0.3, PWM frequency is changed about one time per second (function: PWMSP002_SetPwmFreqAndDutyCycle, this function is not synchronised with PWM).

First problem: when changing PWM frequency sometimes it works OK but sometimes PWM outputs are frozen for about 500us. After this time PWM is running again. Is it a bug in PWMSP002? Or maybe frequency changing must be done in some special way (ie it must be synchronised with PWM)?

Second problem: PWM output voltage is different on both outputs. First output produces square wave approximately between 0V and 3V, second output produces square wave between 0V and 2V. Both outputs have same configuration. One time I saw that PWM started normally (both outputs generates 0-3V wave but after reset device returned to previous state - first output 0-3V and second - 0-2V). Maybe somebody have an idea why one output voltage is reduced?

Third problem: How to change frequency dither compare value? I can't find function that will do this. There is possible to change this value by editing PWMSP002 block (Advanced PWM Configuration/Dither/Compare value), changing this value changes PWMSP002_Handle0.kDitherCompare but this is constant value - it cannot be changed by software. Is there a way to change dither compare value?

Sorry for my not so good English,
TM
0 Likes
0 Replies