Electrical – __HAL_TIM_GetCounter with STM32F103

hal-librarystm32timer

I found a lot of tutorial to get counter value from an interrupt timer
something like:

    /* USER CODE BEGIN WHILE */
  while (1)
  {
  count = __HAL_TIM_GetCounter(&htim2);    //read TIM2 counter value
/* USER CODE END WHILE */

Generally, this code is used with HAL libraries and STM32F4
I used the same but the function is not declared in HAL Libraries.
Do you know why? What I'm supposed to use instead?

Thank you

Best Answer

It was: __HAL_TIM_GET_COUNTER

I should RTFM better