cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157 input capture gives wrong value

alex_vm
Associate II

Hello,

 

I've tried measure period of  GPS PPS which is very high accuracy. I'm using TIM5 input capture mode, reset slave mode. The TIM5 CCR1 gives value 208877646 that is wrong because I use high accurate generator for sys clock. The right value is about 209000000. So maybe anyone meet the problem?

 

Thanks,

Alex.

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi @alex_vm ,

could you check the real TIM5 clock using :

 grep -E "clock|tim5_k" /sys/kernel/debug/clk/clk_summary

in starter package, the clock is defined as 208877930Hz, so your results sound good with this value (tolerance of HSE oscillator).

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
PatrickF
ST Employee

Hi @alex_vm ,

could you check the real TIM5 clock using :

 grep -E "clock|tim5_k" /sys/kernel/debug/clk/clk_summary

in starter package, the clock is defined as 208877930Hz, so your results sound good with this value (tolerance of HSE oscillator).

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi Patrick

Thank you for your help. I forget to write in the start topic I'm using M4 in standalone mode .But as I think the cause is a same.

BR