I am trying to configure FlexTimer to use a free running counter. I have selected System clock as source of clock. please tell me if I am doing it right and how do i read the status of counter. or please share some code for this FTM configurations.
FTM0.CNTIN = FTM_CNT_COUNT(0); /*initize counter with 0*/
FTM0.MODE = FTM_MODE_WPDIS(1); /*write protection disabled */
FTM0.SC = FTM_SC_CLKS(1); /* clock source selection: System clock*/
FTM0.SC = FTM_SC_PS(3); /* Prescaler */
FTM0.MODE = FTM_MODE_FTMEN(1); /* FTM enable*/