cancel
Showing results for 
Search instead for 
Did you mean: 

HAL and I2c problem

askari.nima
Associate II
Posted on January 16, 2015 at 12:42

I connect mpu6050 to i2c3 and make a project with stm32cube and enable i2c3.

but cant detect sensor.

for(i=0 ; i<255 ; i++)

    {

        test = HAL_I2C_IsDeviceReady(&hi2c3,i,10,100);

        if(test == HAL_OK)

            break;

    }

return always HAL_BUSY 

my board is stm32f4discovery

#i-can''t-help-you-with-that
11 REPLIES 11
askari.nima
Associate II
Posted on January 21, 2015 at 10:51

I see in debug mode , when  execute Init I2c function , Busy flag going to  Set. 

askari.nima
Associate II
Posted on January 22, 2015 at 07:58

My problem Solved .

I try with Stm32cube 4.6 and stm32f1cube and its work