AnsweredAssumed Answered

BUG in stm32f1cube

Question asked by askari.nima on Jan 25, 2015
Latest reply on Jan 26, 2015 by Andrei Chichak
when use i2c and remap pin , __HAL_AFIO_REMAP_I2C1_ENABLE(); function  must be run before


__HAL_AFIO_REMAP_I2C1_ENABLE();

 /**I2C1 GPIO Configuration    
    PB8     ------> I2C1_SCL
    PB9     ------> I2C1_SDA
    */
    GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
    GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
    GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
 

Outcomes