Hi Andy,
If you want the channel match interrupt, you need to enable CHIE, because this will also caused the interrupt event when the interrupt happens.
In the ISR you can write:
void FTM_ISR(void)
{
if(TOF)
{
//clear TOF, and do the overflow things
}
if(CHF)
{
// clear CHF, and do the channel match things.
}
}
But if you don't want to enable CHF, I think you even don't need to check it directly in the interrupt, because the interrupt won't caused by the CHF, you can check it directly in the main while.
From your description, you said you need to check both the overflow event and a channel event, I highly suggest you also enable the CHIE.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------