Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions targets/TARGET_STM/hal_tick_16b.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,13 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
void HAL_SuspendTick(void)
{
TimMasterHandle.Instance = TIM_MST;
// Disable HAL tick and us_ticker update interrupts (used for 32 bit counter)
__HAL_TIM_DISABLE_IT(&TimMasterHandle, (TIM_IT_CC2 | TIM_IT_UPDATE));
__HAL_TIM_DISABLE_IT(&TimMasterHandle, TIM_IT_CC2);
}

void HAL_ResumeTick(void)
{
TimMasterHandle.Instance = TIM_MST;
// Enable HAL tick and us_ticker update interrupts (used for 32 bit counter)
__HAL_TIM_ENABLE_IT(&TimMasterHandle, (TIM_IT_CC2 | TIM_IT_UPDATE));
__HAL_TIM_ENABLE_IT(&TimMasterHandle, TIM_IT_CC2);
}

#endif // TIM_MST_16BIT
6 changes: 2 additions & 4 deletions targets/TARGET_STM/hal_tick_32b.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,13 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
void HAL_SuspendTick(void)
{
TimMasterHandle.Instance = TIM_MST;
// Disable HAL tick and us_ticker update interrupts (used for 32 bit counter)
__HAL_TIM_DISABLE_IT(&TimMasterHandle, (TIM_IT_CC2 | TIM_IT_UPDATE));
__HAL_TIM_DISABLE_IT(&TimMasterHandle, TIM_IT_CC2);
}

void HAL_ResumeTick(void)
{
TimMasterHandle.Instance = TIM_MST;
// Enable HAL tick and us_ticker update interrupts (used for 32 bit counter)
__HAL_TIM_ENABLE_IT(&TimMasterHandle, (TIM_IT_CC2 | TIM_IT_UPDATE));
__HAL_TIM_ENABLE_IT(&TimMasterHandle, TIM_IT_CC2);
}

#endif // !TIM_MST_16BIT