2020-10-22 07:38 AM
2020-10-22 08:42 AM
Perhaps you can Google some of the functions and parameters here, or grep the library source/examples?
Might need to set up the TIM in a maximal count mode.
I'm not using these parts, check the data sheet for specific pin utilization
GPIO_Init(GPIOC, GPIO_PIN_1, GPIO_MODE_IN_PU_NO_IT);//PC1(TIM1_CH1)
TIM1_TIxExternalClockConfig(TIM1_TIXEXTERNALCLK1SOURCE_TI1,TIM1_ICPOLARITY_FALLING, 0x0f);//(TIM1_CH1)
TIM1_Cmd(ENABLE);
2020-10-23 11:26 PM
Thank you I have done some changes in you mentioned code and it starts working . thanks
My code is as follows
GPIO_Init(GPIOC, GPIO_PIN_1,GPIO_MODE_IN_FL_NO_IT );//PC1(TIM1_CH1)
TIM1_TIxExternalClockConfig(TIM1_TIXEXTERNALCLK1SOURCE_TI1,TIM1_ICPOLARITY_RISING, 0x00);//(TIM1_CH1)
TIM1_Cmd(ENABLE);
2020-10-24 01:09 AM
it is start working but the counter resets to intermittent value and never counts upto 65535.
can you please tell me what could be the reason