cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103C6T6A I2C interface not working

RShiv.1
Senior
 
16 REPLIES 16

Hi QSHA0,

If you can suggest us any better solution will be good ..kindly let me know

regards

Ravi

RShiv.1
Senior

Hi,

Tried the above code with ST25R3911B disco board which has STM32L476RET..

here we are not seeing any ret value..but the sensor is responding with some LED indication..

some configuration issue is stopping the ret values to indicate whether the I2C is working or not..

kindly suggest any changes in the code if any..then same configurations can be applied for STM32F103C6...kindly help us out if you have any suggestion.

thanks and regards

Ravi

RShiv.1
Senior

HI,

I also did the print inside HAL_I2C_Master_Transmit and also HAL_I2C_IsDeviceReady()...

looks like the state is not moving to HAL_I2C_STATE_READY state...any issue with the I2C settings..do we need to add any pull up ..kindly let me know.

regards

Ravi

RShiv.1
Senior

Hi,

wait for TSflag to be set ..looks like timeout issue..let me know where could be the issue.

 while (hi2c->XferCount > 0U)

  {

   /* Wait until TXIS flag is set */

   if (I2C_WaitOnTXISFlagUntilTimeout(hi2c, Timeout, tickstart) != HAL_OK)

   {

    printf("inside while 1 HAL error = %d ",HAL_ERROR);

    return HAL_ERROR;

   }

Thanks and regards

Ravi

Hi,

I am seeing a timeout error inside HAL_I2C_Master_Transmit()...

I have pull up 4.7K resistor...where could be the issue...kindly let me know...any idea kinfly suggest

RShiv.1
Senior

Hi,

I am seeing a timeout error inside HAL_I2C_Master_Transmit()...

I have pull up 4.7K resistor...where could be the issue...kindly let me know...any idea kindly suggest...

any directions will be very helpful...this is for STM32F103C6T6..

this is in our custom board...

Thanks

Ravi

RShiv.1
Senior

Hi,

No response from any of ST member here....waiting for all your responses.It will really help us move forward..since AC6 is not supported we need to use cubeID to get the I2C communication done..kindly let us know how to move ahead from here

Thanks

Ravi