AnsweredAssumed Answered

Bug Report STM32F10x_StdPeriph_Driver

Question asked by saunderson.julian on Nov 14, 2014
Latest reply on Nov 14, 2014 by saunderson.julian
Hi, I'm just starting on ARM CORTEX and STM32 via The Spark Core so forgive me if I'm missing something but in file stm32f10x_tim.c

Function
voidTIM_ClearITPendingBit(TIM_TypeDef* TIMx, uint16_t TIM_IT)

the lines

02681   /* Clear the IT pending Bit */02682   TIMx->SR = (uint16_t)~TIM_IT;

should surely read

02681   /* Clear the IT pending Bit */02682   TIMx->SR &= (uint16_t)~TIM_IT;

With &= instead of just = otherwise the function is clobbering all the flags in the status register. That's all.

Outcomes