AnsweredAssumed Answered

How can I get the CnV Register to Update for a simple FTM-PWM at counter reload time on KV10

Question asked by Michael Liebert on Oct 14, 2016
Latest reply on Oct 18, 2016 by Hui_Ma

I understand that writing to e.g., FTM0_C1V writes to a shadow register (which I apparently cannot see, at least with KDS).  But I cannot get that value to transfer out of the shadow register.  I would most like it to be transferred out when the PWM Counter is reloaded, but I would also like to know how to make it happen immediately upon writing to the shadow register. 

 

I am trying to do this without your "drivers."  I'm setting FTM=1 and CLKS[1:0] ≠ 0:0.  I would note that in the manual I have (KV10P48M75RMRev. 7, September 2014) only discusses non-output compare mode and SYNCEN = 1.   I'm trying to get a single edge-mode PWM going.  At least initially, I don't care about synchronization with other PWMs.  And I only see SYNCENn's defined.  I do not see a single SYNCEN bit.

 

Note that if I set FTMEN=0, everything works the way I expect it to for now but I know that eventually I will want capabilities like Deadtime which only exist when FTMEN=1.

 

Code is attached.

Original Attachment has been moved to: main.c.zip

Original Attachment has been moved to: HdwrRegDefn.h.zip

Outcomes