AnsweredAssumed Answered

K64F Edge Aligned PWM with FTM: How to change Duty Cycle?

Question asked by geeks anon on Aug 3, 2015
Latest reply on Aug 5, 2015 by Alice_Yang

Hello,

 

I've poured through App Notes and the User Guide to try and figure out how to change the Duty Cycle on Edge Aligned PWM using an FTM.

 

Specifically, I'm trying to use FTM2 with the following PE configuration (non KSDK). A PWM signal with the original CnV values is created.

 

FTM2_1.PNG

FTM2_2.PNG

 

Like I said, everything works until I try to change the CnV values.

 

In a loop that fires every 100ms, I have the following:

 

  int temp = 0;

  temp = FTM2_C0V;
  if(temp < 0x4000){
  FTM2_C0V = temp + 1;
  } else {
  FTM2_C0V = 1;
  }

 

Using the debugger, FTM2_C0V never changes.

 

From what I have gathered in app notes, PWM Synchronization can only be used in combine mode. This is not what I want. I want CH0 and CH1 to be independent PWM pins.

 

How do I get CnV to update?

 

Any and all thoughts are appreciated.

Outcomes