read timer value function
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-05-20 11:16 PM
Posted on May 21, 2014 at 08:16
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 #timer
Labels:
- Labels:
-
STM32Cube MCU Packages
-
TIM
This discussion is locked. Please start a new topic to ask your question.
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-05-21 1:06 AM
Posted on May 21, 2014 at 10:06
You can try
counter = htim.Instance->CNT;Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-05-21 8:26 AM
Posted on May 21, 2014 at 17:26
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.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-05-21 8:41 PM
Posted on May 22, 2014 at 05:41
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-05-21 10:43 PM
Posted on May 22, 2014 at 07:43
i cant find This macro in
STM32Cube FW_F4 V1.1.0
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-05-22 7:06 AM
Posted on May 22, 2014 at 16:06
I add the
__HAL_TIM_GetCounter
macro, and it works good. ThanksOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-05-23 2:03 AM
Posted on May 23, 2014 at 11:03
Hi,
This macro will be available the next STM32Cube_FW_F4 release.With regards.