External Frequence and Duty Input Measurement

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

External Frequence and Duty Input Measurement

跳至解决方案
1,411 次查看
Bkaya
Contributor III

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

0 项奖励
回复
1 解答
1,202 次查看
diego_charles
NXP TechSupport
NXP TechSupport

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

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,341 次查看
diego_charles
NXP TechSupport
NXP TechSupport

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.

0 项奖励
回复
1,317 次查看
Bkaya
Contributor III

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

0 项奖励
回复
1,203 次查看
diego_charles
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复