mbed

Fork of mbed-dev by mbed official

Revision:
181:96ed750bd169
Parent:
176:af195413fb11
diff -r b0033dcd6934 -r 96ed750bd169 targets/TARGET_STM/hal_tick_32b.c
--- a/targets/TARGET_STM/hal_tick_32b.c	Thu Dec 07 14:01:42 2017 +0000
+++ b/targets/TARGET_STM/hal_tick_32b.c	Wed Jan 17 15:23:54 2018 +0000
@@ -42,7 +42,7 @@
     if (__HAL_TIM_GET_FLAG(&TimMasterHandle, TIM_FLAG_CC2) == SET) {
         if (__HAL_TIM_GET_IT_SOURCE(&TimMasterHandle, TIM_IT_CC2) == SET) {
             __HAL_TIM_CLEAR_IT(&TimMasterHandle, TIM_IT_CC2);
-            uint32_t val = __HAL_TIM_GetCounter(&TimMasterHandle);
+            uint32_t val = __HAL_TIM_GET_COUNTER(&TimMasterHandle);
             if ((val - PreviousVal) >= HAL_TICK_DELAY) {
                 // Increment HAL variable
                 HAL_IncTick();
@@ -114,7 +114,7 @@
 
     // Channel 2 for HAL tick
     HAL_TIM_OC_Start(&TimMasterHandle, TIM_CHANNEL_2);
-    PreviousVal = __HAL_TIM_GetCounter(&TimMasterHandle);
+    PreviousVal = __HAL_TIM_GET_COUNTER(&TimMasterHandle);
     __HAL_TIM_SET_COMPARE(&TimMasterHandle, TIM_CHANNEL_2, PreviousVal + HAL_TICK_DELAY);
     __HAL_TIM_ENABLE_IT(&TimMasterHandle, TIM_IT_CC2);