Hi CoreCode,
Some peripheral modules do not operate when in debug mode and you have to let the code execute full speed and instrument it to determine what is happening. I don't like that feature in a peripheral and wish all designers would implement a "debug" mode.
The Reference Manual does have the following:
36.3.4 Counter (FTMx_CNT)
The CNT register contains the FTM counter value.
Reset clears the CNT register. Writing any value to COUNT updates the counter with its
initial value, CNTIN.
When BDM is active, the FTM counter is frozen. This is the value that you may read.
Memory map and register definition
K20 Sub-Family Reference Manual, Rev. 1 Mar 2012
I've also attached a test file that plays with the FTM1 (I tested with TWR-K60D100M) and it can be setup as polled or interrupt mode. I tried to comment the code as best as I could so it might help others.
This code can replace the MQX4.0/mqx/examples/timer/main.c
Regards,
David