Question
How to measure clock frequency inside of MCU?
Posted on December 29, 2015 at 16:06
Hi.
I would like to measure different clock sources with TIM16 and MCO as it is described in reference manual for STM32F303 uC, which I am using. I configured TIM16 input capture from remap (in TIM16->OR register), but I am not sure how exactly this measuring works. In the reference manual, there is no extensive description. Could someone describe how this works please. I would be very grateful. Short description of this approach is in RM on pages 122 and 136. Or do you have any other suggestion how to measure clock with minimum CPU usage? Actualluy I don't have to know exactly what the frequency is, but have to know when something goes wrong (if frequency is not in the specified range). Thanks a lot.