Skip to main content
Akhil Francis
Associate II
June 2, 2017
Solved

Stm32f103 I2c Error

  • June 2, 2017
  • 3 replies
  • 1363 views
Posted on June 02, 2017 at 07:32

Hai, I am using Stm32f103vbt6 micro controller, I have some issue with interfacing the I2C EEPROM. 

eeprom is at24cm02. its has only one address pin. In code 'I2C_Send7bitAddress ' this line has sussefully send, My addres byte is 0xA0. but after that 

while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED))

{

/* If the timeout delay is exeeded, exit with error code */

if ((timeout--) == 0) return 0xFF;

}

this line getting error.

what is the reason for this?

Please give me a reply

    This topic has been closed for replies.
    Best answer by Akhil Francis
    Posted on June 02, 2017 at 13:46

    Hi zhitai liu

    ,

    Thanks for your reply, i solved the problem,Problem was with the pull up resistors of the data line and clock line .

    3 replies

    Zt Liu
    Senior III
    June 2, 2017
    Posted on June 02, 2017 at 12:39

    It's always healthy to use oscilloscope and check whether the digital pulses are really sent out.

    :)

    Akhil Francis
    Akhil FrancisAuthorBest answer
    Associate II
    June 2, 2017
    Posted on June 02, 2017 at 13:46

    Hi zhitai liu

    ,

    Thanks for your reply, i solved the problem,Problem was with the pull up resistors of the data line and clock line .

    Zt Liu
    Senior III
    June 8, 2017
    Posted on June 08, 2017 at 08:12

    Good job!!

    Sometimes to debug hardware error is as fun as firmware coding!!