FTM timers

Status
Not open for further replies.

alfredDebug

New member
Hello
I'm trying to configure the one of the 4 FTM timers, so, i don't find the register that allow the start of counter.
I just want to initialize, start and reset the FTM timer0 whithout using interrupts:

FTM0_MODE|=0x05; //enable writing mode and FTM timer
FTM0_CNTIN = 0x0000; // counter initial value
FTM0_CNT = 0x0000; // counter value
FTM0_MOD=0xFFFF;

if this is just, what's the register start the counter, (like in PIT timer0 PIT_TCTRL0|=TEN).

Thank u for your help.
 
FTM0_MODE = 0;
FTM0_CNT = 0; // counter value
FTM0_MOD = ( F_BUS / 20000) - 1; // frequency
FTM0_SC = FTM_SC_CLKS(1);

and you can print FTM0_CNT and see it changing
 
Last edited:
Status
Not open for further replies.
Back
Top