Page 1 of 1

CH_Frequency and Time measurement driver STM32F4 discovery

Posted: Fri Mar 07, 2014 9:07 pm
by Faisal Mehmood
I want to find the time in which my loop executes. I am using Time measurement driver. How is ch_frequency related to timing precision??
Curently Ch_frequency is set at 1000 and best time measurement gives 8550. This value increases to 36117 if I increase ch_frequency to 1,000,000.
I want as precise time as possible.
any suggesiton??
Regards

Re: CH_Frequency and Time measurement driver STM32F4 discove

Posted: Fri Mar 07, 2014 9:38 pm
by Giovanni
CH_FREQUENCY is unrelated.

Time measurement is performed using a real time counter with a resolution equal to the MCU clock.

Interrupts can affect measurements so if you need absolute precision then you need to measure while interrupts are disabled.

Giovanni

Re: CH_Frequency and Time measurement driver STM32F4 discove

Posted: Sat Mar 08, 2014 2:22 pm
by Faisal Mehmood
Thnx!