AnsweredAssumed Answered

9S08PT32 - The FTMX_CXV register just won't take the value I try to write to it.

Question asked by LARRY MITSCHKE on Feb 8, 2014
Latest reply on Feb 13, 2014 by LARRY MITSCHKE

Even after waiting for the next timer tic where it should load from buffer to registers, the value stays at zero.  I have made sure to write the config registers before loading the value registers, but they stay at zero.   This is the initialization :

 

FTM0_SC = 0x0B ; // CLKS = 01 or bus clk, PS = 011 or prescale div by 8

FTM2_SC = 0x2B ; // center pwm, CLKS = 01 or bus clk, PS = 011 or prescale div by 8

FTM0_C0SC = 0x40 ;// enable interrupts

FTM0_C1SC = 0x40 ;

FTM2_C5SC = 0x08 ;

FTM0_C0V = FLASH_RESOLUTION ;

FTM0_C1V = (unsigned int) (AUX_TIMER_PERIOD   (FLASH_RESOLUTION / 2));

FTM2_MOD = 0x480 ;// 200 hz PWM

FTM0_CNT = 0 ;// zero the counters

FTM2_CNT = 0 ;    

 

The MOD value takes, though.  Any idea why this is happening?

Outcomes