How to use Modified Combine PWM Mode

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

How to use Modified Combine PWM Mode

1,754 Views
zliu25
Contributor II

I have a requirement that need to generate PWM consecutively with varied duty and fixed period.

The "Modified Combine PWM Mode" referred in chapter 45.5.10 of datasheet as follows match my requirement exactly.

image (3).png

I have configurated the Modified Combine PWM Mode and generated codes in the S32 Design Studio, and called the function "FTM_DRV_UpdatePwmChannel()" to generate PWM with fixed duty in the oscilloscope.
 
But I think there is no difference of PWM generation between use of  Modified Combine PWM Mode and common-used Edge-Aligned PWM (EPWM) mode.

     

Could you give me some tips or references about how to use Modified Combine PWM Mode to fill my requirement of PWM generation?

Tags (2)
0 Kudos
Reply
3 Replies

1,713 Views
zliu25
Contributor II

Hi,

Thank you for you reply.

I have perused the chapter 3.4 of reference: AN 5303 and related codes in the package.

In the chapter of Combine Mode, it use the combine mode to generate two channels PWM output with complementary mode. And I have followed the example to configurate the Combine Mode and generate PWM output successfully. (My purpose is to use "Modified Combine PWM Mode" to generated one channel PWM output with varied duty consecutively.)

The frequency of PWM is 20KHz(20000Hz)in my project, this high frequency leads to high CPU load in the software. 

Could you give me some ideas about the suitable method of generating PWM with lower CPU load ?

Tags (2)
0 Kudos
Reply

1,705 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@zliu25

I don't know how you measure the CPU load, and secondly I don't know how to reduce the CPU load in your question.
I once used six PWM output channels and four input capture channels in a project, and I did not find the problem of high CPU load.

BR!

     Jim,

0 Kudos
Reply

1,740 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@zliu25

please read the AN5303:https://www.nxp.com/search?keyword=AN5303&start=0 

Senlent_0-1648872032665.png

and take a look at the Phase-shifted PWM,the chapter 3.4 Combine mode.

BR!

     Jim,

 

0 Kudos
Reply