Sorry I may not understand your question, please correct me if I understand it wrong.
void LPTMR_ISR(void){
timer_flag = true;
/* Clear compare flag */
LPTMR_DRV_ClearCompareFlag(INST_LPTMR1);
}
Since you configured CSR[TFC]=0, CNR is reset whenever TCF is set.
I think after entering LPTMR_ISR, the CNR has actually been reset and will no longer increase.
![CSR[TFC].png CSR[TFC].png](https://community.nxp.com/t5/image/serverpage/image-id/255021iA4D79D8B00068F87/image-size/large?v=v2&px=999)
LPTMR_DRV_GetCounterValueByCount can be used to check whether the CNR is still increasing.
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------