mirror of https://github.com/ARMmbed/mbed-os.git
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 anymorepull/4424/head
parent
35c68859c0
commit
1b684ca4e9
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue