Skip to content

Commit 1b684ca

Browse files
committed
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
1 parent 35c6885 commit 1b684ca

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

targets/TARGET_STM/us_ticker_16b.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,6 @@ uint32_t us_ticker_read()
5555

5656
uint16_t cntH_old, cntH, cntL;
5757
do {
58-
#if defined(TARGET_STM32L0)
59-
// For some reason on L0xx series we need to read and clear the
60-
// overflow flag which give extra time to propelry handle possible
61-
// hiccup after ~60s
62-
if (__HAL_TIM_GET_FLAG(&TimMasterHandle, TIM_FLAG_CC1OF) == SET) {
63-
__HAL_TIM_CLEAR_FLAG(&TimMasterHandle, TIM_FLAG_CC1OF);
64-
}
65-
#endif
6658
cntH_old = SlaveCounter;
6759
/* SlaveCounter needs to be checked before AND after we read the
6860
* current counter TIM_MST->CNT, in case it wraps around.

0 commit comments

Comments
 (0)