cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32f103 I2c Error

Akhil Francis
Associate II
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

1 ACCEPTED SOLUTION

Accepted Solutions
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 .

View solution in original post

3 REPLIES 3
Zt Liu
Senior III
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.

:)

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 .

Posted on June 08, 2017 at 08:12

Good job!!

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