Hi,
I have a problem with update (or set) the FTM0_C0V or FTM0_C1V register. I can use FTM2 with no problem.
I know that FTM0 is more simple than FTM2.
Here is my Init function:
void FTM0_Init(void){
/* ReSet the CLKS */
FTM0->SC = 0;
/* Set the PWM period */
FTM0->MOD = 0x0FFF0;
/* Set the channel values Output Capture Mode*/
FTM0->CONTROLS[0].CnSC = FTM_CnSC_ELSA_MASK | FTM_CnSC_CHIE_MASK;
FTM0->CONTROLS[1].CnSC = FTM_CnSC_ELSA_MASK | FTM_CnSC_CHIE_MASK;
/* Set the C0V and C1V */
FTM0->CONTROLS[0].CnV = 0x08F8;
FTM0->CONTROLS[1].CnV = 0x0800;
/* Set CLKS*/
FTM0->SC = FTM_SC_CLKS(1) | FTM_SC_PS(0);
}
The CnSC registers are updated OK, The counter is counting but I cant set the CnV registers.
The CLKS is 0:0, but CnV is not changed.
I tried to change CnV repeatedly in loop too. No change.
Can somebody help me please?
Thank You.
Jaroslav