hello,
I want to use TPM as a common timer, but met a confusing phenomenon, when MOD=1, the period is not right.
hardware:FRDM_KL43Z
TPM clock source is OSCERCLK(32.768Khz)
I toggle a gpio in TPM timer ISR, When MOD=1, the frequency is wrong. It will be right if MOD set for other values.
Thanks.
could please share customer information, thanks a lot!
Hi Wenxue,
Sorry for the late reply.
See below information received from our AE:
this root cause is that it need to take 2 TPM clock cycle to syncTOF flag, so if set MOD = 1, counting time is too short, and it need to generate OVERFLOW 2 times till set the TOF flag.
will notice customer not to try set MOD to 1, and add note in reference manual.
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Robin,
Got it, thanks!
Best Regards,
Wenxue
Hi Wenxue,
I test the project on FRDM-KL43Z board find the same phenomenon.
I will ask the Kinetis AE team for help on this case. And I will inform you as soon as I get any feedback.
Best Regards,
Robin
hello Robin,
Do you have any update?
Sorry. I am still waiting for the reply from our AE.
You can see that case in our internal place:TPM don't work well when MOD=1
Thanks very much.