Hi NXP stuff,
Now I am working on NXP FRDM-K64F, I am trying to implement a frequency measurement module.
I am using SDK example and make some modification.
I have tried single edge and dual edge capture mode. and finally I found there dual edge has better performance than single edge capture mode.
Then, I was try to test the cap frequency, because base on the document ( Document Number: K64P144M120SF5RM, Rev. 2, January 2014) , it mentioned " Note that the maximum frequency for the channel input signal to be detected correctly is system clock divided by 4, which is required to meet Nyquist criteria for signal sampling." ( chapter 40.4.4, page 1011) . I believe dual edge capture mode should has same requirement ( please correct me if I am wrong )
According to the example code, FTM using System clock ( which is bus clock), default bus clock is half of core clock ( 60MHz), and I have change it to 120MHz in my test code.
I have test the input frequency from 10KHz to 30MHz, but I found some issue :
- I can only measure up to 15MHz, and the result will become incorrect once frequency higher than it, I believe it because of ISR processing time is quite long, therefore I believe use DMA can help me solve this issue, am I right?
- when the frequency between 11MHz to 12MHz there has no interrupt been received(cannot enter ISR handler), I am not sure it's design feature or my hardware issue.
- when the frequency higher than 20MHz, there has no interrupt been received (cannot enter ISR handler), I believe it because the captured frequency has caped, therefore FTM hardware module cannot generate interrupt to NVIC. but according to the document, the maximum frequency should be 30MHz ( bus clock / 4) , that makes me very confuse. did I misunderstand ?
my source code has been attached, and the original example project is : frdmk64f_ftm_dual_edge_capture
please kindly assist, thanks