Electronic – Problem with I2C EEPROM communication

eepromi2cstm32

I have a STM32L MCU connected to M24LR64E, an I2C EEPROM. Previously i had this setup working but then i changed some things (layout, firmware) and somehow i screwed the I2C and it is not working now.

I'm using it with the I2C_DutyCycle_2 mode at 100khz, 4.7k pull-up on both SDA and SCL lines. Everything on the board is working at 3.3v. Below is a shot of both SCL/SDA lines on my scope, sadly i don't have a logic analizer to play with.

Shot of the start of the I2C data

Most of the I2C shots that i've found on Google seems very 'nice' with square-like rise/fall signals, and mine looks very different.

Any suggestions? Does the attached image looks good for a I2C bus?

Thanks, a lot.

Best Answer

Fixed. Thanks to Oli Glaser i fixed the clock config routine and the scope captures looks very good now, but the main issue (MCU not reading the EEPROM) persisted. After hours and hours of debug, trial/error, datasheets, erratas, forums, etc i found that somehow i changed the SLAVE DEVICE ADDRESS on my code so the EEPROM was not answering because i was not calling it properly!

To any future reader, the 7-bit device address for this device should be 0x53 or 1010011b (Don't forget the proper left shifting and set the read/write bit to get the full byte).

Thanks for all the help and as expected, i learned A LOT from this issue!