2014-05-20 11:16 PM
hi,
is there a way to read the Timers counter value?i can't find function for that at the HAL drivers Timer library.pls help.(i m using stm32f4 discovery board.thanks #stm32cube #hal-diver #timer2014-05-21 01:06 AM
You can try
counter = htim.Instance->CNT;2014-05-21 08:26 AM
Hi,
To get TIM counter register value on runtime, you can use the Macro available in :stm32f4xx_hal_tim.h/**
* @brief Gets the TIM Counter Register value on runtime.
* @param __HANDLE__: TIM handle.
* @retval None
*/
#define __HAL_TIM_GetCounter(__HANDLE__) ((__HANDLE__)->Instance->CNT)
With regards.
2014-05-21 08:41 PM
Hi,
Is any new version than stm32f4xx_hal_tim.h V1.0.0 from 18-February-2014? because I can't see__HAL_TIM_GetCounter
.
I am use STM32Cube FW_F4 V1.1.0
2014-05-21 10:43 PM
i cant find This macro in
STM32Cube FW_F4 V1.1.0
2014-05-22 07:06 AM
I add the
__HAL_TIM_GetCounter
macro, and it works good. Thanks2014-05-23 02:03 AM
Hi,
This macro will be available the next STM32Cube_FW_F4 release.With regards.