Hello Everyone,
I want to measure external frequency input and duty cycle on my custom board i.mx.rt1176. I did not find application note or example code. Is there any source that help me to start writing my code?
Best Regards,
Basri KAYA
Solved! Go to Solution.
Hi @Bkaya
Thank you very much for your patience.
The QTIMER is limited to work with the BUS_CLK_ROOT, given the fact that you are already using the maximum prescaler value, I would think that testing with reducing the frequency of the bus clock could have been an option.
Another way to measure with such low frequecy would be using low clock reference like the RTC.
Diego
Hi @Bkaya
Thank you for reaching us and for your patience.
I think you could use the QTIMER peripheral for this purpose. There is input capture demo on the SDK (qtmr_inputcapture_outputpwm_cm7) this could help you as a starting point to measure frequency.
As one of my colleagues mention the QTIMER could also help you to measure duty cycle. See this post PWM duty cycle measurement on RT105x for a more detailed idea.
I hope this still could help you.
Diego.
Hi @diego_charles,
Thank you. I read the frequency input.
I changed the divider to 128 so i can measure between 20-10.000 Hz. I did not measure below 20 Hz. Is there a way to do it ?
Best Regards,
Basri KAYA
Hi @Bkaya
Thank you very much for your patience.
The QTIMER is limited to work with the BUS_CLK_ROOT, given the fact that you are already using the maximum prescaler value, I would think that testing with reducing the frequency of the bus clock could have been an option.
Another way to measure with such low frequecy would be using low clock reference like the RTC.
Diego