This nice document: https://cache.nxp.com/docs/en/application-note/AN5142.pdf
provides many code examples on how to program K66 chips with FTM. On my Teensy 3.6 (which uses K66), the code for "Phase-shift PWM signal" from section 3.4 works perfectly well. However, the code from "Single-edge capture mode" in section 3.8 doesn't work. Both use FTM0, and both should be using the same ports. For capture mode, I expect to input a signal at FTM0_CH0, and then get the interrupt triggered to modify the value of diff. But I noticed that the interrupt is never called.
What am I missing? Please assist.
Thank you.
Hi Samer,
Sorry for the inconvenience! This section may lack the NVIC setting of FTM0.
Please refer the method descripted in '3.1.2.1 Configuring the NVIC' of KQRUG.
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
----------------------------------------------------------------------------------------------------------------------
Thank you for your response. Actually I tried adding this before asking the question:
Please download the SDK_2.2_FRDM-K66Fpackage refer Generating a downloadable MCUXpresso SDK v.2 package.
And then you can find the input_capture example in it's folder. (For example: C:\SDK_2.2_FRDM-K66F\boards\frdmk66f\driver_examples\ftm\input_capture)
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks. I'll research and try this.