AnsweredAssumed Answered

FTM Channel Flag: Set only when interrupts are enabled?

Question asked by Andy Berger on Aug 20, 2018
Latest reply on Aug 22, 2018 by Kerry Zhou

I am using an ISR to handle both timer overflow events and rising edge captures for an FTM module. Therefore, inside the ISR, I need to check the FTM flags to identify the source of the interrupt. That is, the first thing I do inside the ISR is:

bool overflow = (FTM_GetStatusFlags(FTM0) & kFTM_TimeOverflowFlag) == kFTM_TimeOverflowFlag;
bool caughtEdge = (FTM_GetStatusFlags(FTM0) & kFTM_Chnl0Flag) == kFTM_Chnl0Flag;

My question: is the channel flag set even when interrupts for that channel are disabled? In other words, in instances when I only have the overflow interrupt enabled, will the channel flag still be set if an edge is detected on that channel? If so, this means that the ISR will be handling both overflows and channel edge detects, even though I have the edge detect interrupts disabled.

Outcomes