About the high resolution PWM feature on XMC MCUs

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

cross mob
Not applicable
Hello!

I don't have a specific question about a concrete application. I would just like to check if I understood some facts about the HRPWM module correctly:

1. It makes possible to create a PWM signal and vary its duty cycle with 150 ps resolution, right? So instead of jumping from 20% to 21%, it makes it possible to have 20,000% and 20,001% (nevermind the figures), am I correct?
2. In which conditions can this happen? I mean, are the 150ps always guaranteed or does it vary with the frequency of the wave or other factors?
3. How is this achieved, in general terms? I tried to read the XMC4400 reference manual but its extraordinarily complex for my knowledge of MCUs.
4. Is it possible to have 2 of these high resolution PWM signals aligned by their center (for example, to drive MOSFETs in a converter)? Can the be used as flexibly as the low res. PWM signals?

Thank you very much!

Pedro
0 Likes
2 Replies
Halim
Employee
Employee
First question asked First reply posted First solution authored
Hi

To answer your questions:

1. It makes possible to create a PWM signal and vary its duty cycle with 150 ps resolution, right? So instead of jumping from 20% to 21%, it makes it possible to have 20,000% and 20,001% (nevermind the figures), am I correct?
Yes. That is the idea of HRPWM. Because microcontroller is a digital system, the PWM frequency is limited by the MCU clock cycle. This will introduce a "limit cycle" phenomenon to the system. With HRPWM, the system behavior will have an "analog-like" behavior.

2. In which conditions can this happen? I mean, are the 150ps always guaranteed or does it vary with the frequency of the wave or other factors?
150ps is the maximum resolution you can achieve with the module. I don't quite understand on your latter question. For any XMC4 devices with HRPWM, it will comes with 150ps max HRPWM resolution. It will vary with the main PWM you set at CCU8. Take note, the HRPWM is tied closely with CCU8 PWM. The High Res PWM is added on the main CCU8 PWM.

3. How is this achieved, in general terms? I tried to read the XMC4400 reference manual but its extraordinarily complex for my knowledge of MCUs.
To put it simply, you can set compare register HRCyCR1 and HRCyCR2 for High Res PWM at rising edge and falling edge, respectively.

4. Is it possible to have 2 of these high resolution PWM signals aligned by their center (for example, to drive MOSFETs in a converter)? Can the be used as flexibly as the low res. PWM signals?
Sure you can enable or disable the High Resolution feature and you will get the low resolution PWM from the High Res channels.
0 Likes
Not applicable
Thank you Halim, your answers were very useful 🙂
0 Likes