problem with STM8lF3U6ATR, timer input capture mode
dear sir ,
I am configuring timer 2 in input capture mode for LSI frequency measurement, settings as per RM0013 doc. as per concept when 1st capture occures at (rising edge) ,whatever counter values (TIM2_CTRH, TIM2_CTRL) are loaded in TIM2_CCR1H,and TIM2_CCR1L at this interrupt event,
and when 2nd capture occure(rising edge) then also whatever incremented couter values (TIM2_CTRH,TIM2_CTRL) gets loaded in to the(TIM2_CCR1H,TIM2_CCR1L) , then as per formulae
lsi_freq=(after N events capture occures)*Fmaster/difference of couter values loaded in TIM2_CCR1H,TIM2_CCR1L
but as per doc RM0013 i am not getting the results. counter values are not loading in to TIM2_CCR1L and TIM2_CCR1H, so i am in deep trouble !
i am kindly requesting you all to please share your experience with me!
also i am directly reading TIM2_CTRH,TIM2_CRTL at interrupt event then as per RM0013, but LSI frequency is comming at arround 17k-21k range for room temp. , but it is quantradectory with doc.
thanks and regards,
Ashvinkumar A Bhagat
(Embedded softwere developer)