I want to use FTM2ch3 of KEA128 to achieve PWM wave duty cycle capture.However, the frequency band that can be captured is very limited, too low frequency PWM wave can not be captured, I would like to ask you have met the same situation.The code is as follows:
Hi Miguel,
Thanks for your reply. My target frequency is 100Hz.In my program, I set up two global variables, which allows me to receive the counter value in
time. I use the monitoring window to monitor them. I found that only the frequency is greater than 3KHz, the counter value will be stable.
At 100Hz, the two global variables change very fast, it is extremely unstable. And I have calculated that the value of CNT does not overflow.
So I'm confused.
Thank you for your help.
Best Regards, ID7729.
Hi @ID7729
The input frequency should not be causing the problem, since the input capture counts from rising, falling or rising and falling edges.
The reference manual only specifys that it has a maximum frquency not a minimum.
26.4.4 Input Capture mode
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.
Can you tell me the frquency you are measuring?
Best Regards, Miguel.