AnsweredAssumed Answered

I2C STM32L053 problem

Question asked by _.Adri on Apr 29, 2016
Latest reply on Apr 29, 2016 by FTITI.Walid
Hello

I have question about i2c. My mcu i2c pin connect to i2c pin evaluation board BU94501.
My i2c init like this
I2C1Handle.Instance              = I2C1;
I2C1Handle.Init.AddressingMode   = I2C_ADDRESSINGMODE_7BIT;
I2C1Handle.Init.Timing           = I2C_TIMING_100KHZ;
I2C1Handle.Init.DualAddressMode  = I2C_DUALADDRESS_DISABLE;
I2C1Handle.Init.GeneralCallMode  = I2C_GENERALCALL_DISABLE;
I2C1Handle.Init.NoStretchMode    = I2C_NOSTRETCH_DISABLE;
I2C1Handle.Init.OwnAddress1      = 0x00;
I2C1Handle.Init.OwnAddress2      = 0x00;
if(HAL_I2C_Init(&I2C1Handle) != HAL_OK)
{
    /* Initialization Error */
    //Error_Handler();   
}  
I try to send HOME command 4 byte {0x61,0x03,0x01,0x01} slave address is 0x86.
But when transmit it always return error HAL_I2C_ERROR_AF.

Could someone help me please ?

Thanks

Outcomes