Skip to main content
RShiv.1
Associate III
November 14, 2022
Question

STM32F103C6T6A I2C interface not working

  • November 14, 2022
  • 14 replies
  • 4277 views

..

This topic has been closed for replies.

14 replies

RShiv.1
RShiv.1Author
Associate III
November 16, 2022

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
RShiv.1Author
Associate III
November 16, 2022

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

RShiv.1
RShiv.1Author
Associate III
November 16, 2022

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
RShiv.1Author
Associate III
November 17, 2022

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