examples/TIM2/TIM2_Input_Capture/main.c
Hi all,
I was studying the examples on timers and so on.
I came across the source ''main.c'' in the STM8S Firmware Library package,
examples/TIM2/TIM2_Input_Capture/main.c, a piece of which is shown below.This example will show you how to measure the frequency of the LSI.
Although this is very clear what the purpose of activating an interrupt CC1?
/* Enable CC1 interrupt */ 00057 (, ); I think we'd needn't any interrupt here ? What do you think? If you go through the same purposed example presented on TIM1 examples section, infact, there's no interrupt initialization at all... Thank you Stefano void(void
)00050 {00051 00052/* Capture only every 8 events!!! */
00053/* Enable capture of TI1 */
00054 (, , , , 0x00);00055 00056/* Enable CC1 interrupt */
00057 (, ); 00058 00059/* Enable TIM2 */
00060 ();00061 00062/* Clear CC1 Flag*/
00063 ();00064 #tim2 #interrupt #capture-compare