AnsweredAssumed Answered

STM32F3 standart peripheral library

Question asked by Vycas.Arturas.001 on Jun 9, 2014
Latest reply on Jun 24, 2014 by Montassar BEN ROMDHANE
Hello. I'm working with I2C at the moment, trying to Read data from ADXL345 accelerometer. I found out in lib "stm32f30x_i2c.c" that:
void I2C_ClearITPendingBit(I2C_TypeDef* I2Cx, uint32_t I2C_IT)
{
  /* Check the parameters */
  assert_param(IS_I2C_ALL_PERIPH(I2Cx));
  assert_param(IS_I2C_CLEAR_IT(I2C_IT));


  /* Clear the selected flag */
  I2Cx->ICR = I2C_IT;
}

and 

void I2C_ClearFlag(I2C_TypeDef* I2Cx, uint32_t I2C_FLAG)

  /* Check the parameters */
  assert_param(IS_I2C_ALL_PERIPH(I2Cx));
  assert_param(IS_I2C_CLEAR_FLAG(I2C_FLAG));


  /* Clear the selected flag */
  I2Cx->ICR = I2C_FLAG;
  }

Shouldn't I2C_ClearITPendingBit  be I2Cx->ISR = I2C_FLAG; ?
Because i'm not able to clear I2C_IT_STOPF , using I2C_ClearITPendingBit. Thanks for your answer in advance.


Outcomes