AnsweredAssumed Answered

Atomic read/clear of QDEC CNT

Question asked by Jeffrey Chan on Mar 20, 2017
Latest reply on Mar 22, 2017 by Jeffrey Chan

Is there a practical way of reading the FTM1_CNT register and clearing it... without losing any ticks?

 

For example:

 

Time 1: Read CNT = 100

Time 2: CNT += 5 (while computing something, incoming "ticks" into QDEC)

Time 3: Clear CNT (Losing 5 "ticks")

Outcomes