Problem in Input Capture Frequency in STM32F401RE Nucleo-64.
Good afternoon,
My quarry regarding Input Capture frequency in STM32F401re micro controller,
I am measuring frequency by Timer1 configuration and Timer2 as an interrupt generator.
in that i was not able to read the capture value from function
"HAL_TIM_ReadCapturedValue(htim1, TIM_CHANNEL_1)"
in this function:
uint32_t HAL_TIM_ReadCapturedValue(TIM_HandleTypeDef *htim, uint32_t Channel)
{
uint32_t tmpreg = 0U;
switch (Channel)
{
case TIM_CHANNEL_1:
{
/* Check the parameters */
assert_param(IS_TIM_CC1_INSTANCE (htim->Instance));
/* Return the capture 1 value */
tmpreg = htim->Instance->CCR1;
break;
}
case TIM_CHANNEL_2:
{
/* Check the parameters */
assert_param(IS_TIM_CC2_INSTANCE(htim->Instance));
/* Return the capture 2 value */
tmpreg = htim->Instance->CCR2;
break;
}
case TIM_CHANNEL_3:
{
/* Check the parameters */
assert_param(IS_TIM_CC3_INSTANCE(htim->Instance));
/* Return the capture 3 value */
tmpreg = htim->Instance->CCR3;
break;
}
case TIM_CHANNEL_4:
{
/* Check the parameters */
assert_param(IS_TIM_CC4_INSTANCE(htim->Instance));
/* Return the capture 4 value */
tmpreg = htim->Instance->CCR4;
break;
}
default:
break;
}
return tmpreg;
}
and my main code is
please guide me for that and give your kind response.
Here is my project file for your reference hope that will help you.
Thank you,
Community.
