Skip to main content
Associate
November 18, 2023
Solved

STM32MP157 input capture gives wrong value

  • November 18, 2023
  • 1 reply
  • 1288 views

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.

This topic has been closed for replies.
Best answer by PatrickF

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.

1 reply

PatrickF
PatrickFBest answer
Technical Moderator
November 20, 2023

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.NEW ! Sidekick STM32 AI agent, see here
alex_vmAuthor
Associate
November 20, 2023

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