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
CH_Frequency and Time measurement driver STM32F4 discovery
Moderator: RoccoMarco
-
Faisal Mehmood
- Posts: 25
- Joined: Sat Jan 26, 2013 10:18 pm
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: CH_Frequency and Time measurement driver STM32F4 discove
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
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
-
Faisal Mehmood
- Posts: 25
- Joined: Sat Jan 26, 2013 10:18 pm