2025-01-23 06:22 AM
Hi,
I have made a customized board using STM32 and M24M01E-FMN6TP, but not able to communicate, kindly find the schematic attached. I have written a code for I2c scanner just to test the circuit and it is giving me no i2c device is connected.
I have tested the same in the customized breakup board, but still no results. I have also tried connecting E1 and E2 to GND, but still not able to communicate.
Kindly guide mw with the solution
Solved! Go to Solution.
2025-01-27 02:40 AM
You have defined 0x50 for the device address. Do you realise that this is a 7bit address that must be shifted one bit to the left for use? You can find the description in stm32l4xx_hal_i2c.c:
DevAddress Target device address: The device 7 bits address value in datasheet must be shifted to the left before calling the interface
In addition, your pull-ups of 4.7k at SDA and SCL might be too big (you have not yet mentioned the line length or the I2C parameters like the speed). You can also replace them with max. 2.7k, better 1.5k...2.2k. If you don't want to desolder them, you can connect 4.7k each in parallel for a test.
Regards
/Peter
2025-01-23 07:53 AM
Where is the schematics?
2025-01-23 11:59 PM
2025-01-24 01:39 AM - edited 2025-01-27 01:58 AM
This is just the schematics of the EEPROM and its power supply. Apropos VCC: did you close J10 for testing?
STM32: which one is it and where did you connect the EEPROM?
Please show the source code of how you are trying to access the ERPROM?
2025-01-24 03:20 AM
Thank you for the reply, Yes i have closed J10 for testing, I have checked voltage across the IC using Multimeter .
Currently I am using STM32L476 based microcontroller, Kindly find the sample code attached. I am using i2c1 ( as i have the breakup board to connect to any I2c bus).
I have also connected LCD for display.
I have also tried using Nucleo-l476RG board connected to my breakup board (EEPROM) and used Arduino IDE to program a simple I2c scanner code, but not able to even detected the EEPROM
Kindly oblige
2025-01-27 02:40 AM
You have defined 0x50 for the device address. Do you realise that this is a 7bit address that must be shifted one bit to the left for use? You can find the description in stm32l4xx_hal_i2c.c:
DevAddress Target device address: The device 7 bits address value in datasheet must be shifted to the left before calling the interface
In addition, your pull-ups of 4.7k at SDA and SCL might be too big (you have not yet mentioned the line length or the I2C parameters like the speed). You can also replace them with max. 2.7k, better 1.5k...2.2k. If you don't want to desolder them, you can connect 4.7k each in parallel for a test.
Regards
/Peter