2020-02-21 07:39 AM
Hello,
I am using I2C on STM32F part STM32F407VG.
I have taken example code from
The I2C configuration for STM32F as slave are following
uint8_t i2cConfiguration(void)
{
I2cHandle.Instance = I2Cx;
I2cHandle.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
I2cHandle.Init.ClockSpeed = 92000;
I2cHandle.Init.DualAddressMode = I2C_DUALADDRESS_DISABLED;
I2cHandle.Init.DutyCycle = I2C_DUTYCYCLE_16_9;
I2cHandle.Init.GeneralCallMode = I2C_GENERALCALL_DISABLED;
I2cHandle.Init.NoStretchMode = I2C_NOSTRETCH_ENABLED;//I2C_NOSTRETCH_DISABLED;
I2cHandle.Init.OwnAddress1 = I2C_ADDRESS;
I2cHandle.Init.OwnAddress2 = 0XFE;
HAL_StatusTypeDef initStatus = HAL_I2C_Init(&I2cHandle);
return initStatus;
}
I have silicon-lab Mighty gecko as I2C Master.
The write operation from Mighty gecko to STM32F is working fine.
But i case of read i am getting HAL_I2C_ErrorCallback triggered.
I tried to debug and came to know that the I2C driver is returning HAL_I2C_ERROR_AF error.
After that i am able to perform any write/read requests.
I can you please help me How i can fix the problem?
Regards
MAbbas
2020-02-24 05:40 AM
Any help about the Problem? Anyone has faced the problem and solved?
i need some solution please help me.