I'm developing an embedded system on STM32 F107 that communicates via i2c with 2 slave devices: a rfid reader rfid manual and a eeprom module eeprom manual. These two devices have the same slave address A0 (for write operations) and A1 (for the read operations). If a use only one device it works fine. But if I use both of them I have a problem. First I read the card id from rfid reader, then I write it in the eeprom (up to here it is all ok), when I try to read again from the rfid reader I get input data that are wrong and always the same even if I change the card. What is happening and what I can do to solve the problem?
Devices must have different addresses. You should reconfigure either device to use a different address to avoid the clash. This is typically done with jumpers (JP1, JP2 on the rfid reader) or by hardwiring some address pins on the chip (A0 and A1 pins on the eeprom chip).