From 46d41d336febae855507029cb2725fad62409f13 Mon Sep 17 00:00:00 2001 From: Laurent MEUNIER Date: Wed, 31 May 2017 09:19:01 +0200 Subject: [PATCH] STM32 16 bits tickers, no need to check TIM_FLAG_CC1OF FLAG Following previous fixes on 16 tickers handling, the overflow flag condition will not happen anymore, so the work-around in place is not needed anymore --- targets/TARGET_STM/us_ticker_16b.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/targets/TARGET_STM/us_ticker_16b.c b/targets/TARGET_STM/us_ticker_16b.c index 73bfcf640b..41fd5b63cf 100644 --- a/targets/TARGET_STM/us_ticker_16b.c +++ b/targets/TARGET_STM/us_ticker_16b.c @@ -55,14 +55,6 @@ uint32_t us_ticker_read() uint16_t cntH_old, cntH, cntL; do { -#if defined(TARGET_STM32L0) - // For some reason on L0xx series we need to read and clear the - // overflow flag which give extra time to propelry handle possible - // hiccup after ~60s - if (__HAL_TIM_GET_FLAG(&TimMasterHandle, TIM_FLAG_CC1OF) == SET) { - __HAL_TIM_CLEAR_FLAG(&TimMasterHandle, TIM_FLAG_CC1OF); - } -#endif cntH_old = SlaveCounter; /* SlaveCounter needs to be checked before AND after we read the * current counter TIM_MST->CNT, in case it wraps around.