2025-01-16 03:30 AM
I want to use my ST25DV with both I2C and RF interfaces.
There is no clear arbitrage between the 2, but the first is served. Moreover, I tested that while I2C is operating in reading and writing bytes in a for loop, the RF can corrupt the data in some way making the I2C lose data, or answer busy.
I tried to switch off the RF using the dynamic command RF_MNGT_Dyn at address 2003h setting RF_SLEEP =1, while I2C is writing or reading. But the data result was corrupted again.
this is my code simplified:
Turn EEPROM on;
sleep RF;
wait RF OFF time;
Write 64 bytes with I2C;
Read 64 bytes with I2C;
Calculate CRC and identify if byte written are equal to written;
2025-01-16 04:54 AM
Hello,
"There is no clear arbitrage between the 2, but the first is served." => well, this is actually clearly stated in the datasheet. Please see chapter 5.3 Interface arbitration. It says: "The device automatically arbitrates the exclusive usage of RF and I2C interfaces, according to a first-talks-first served scheme".
The figure 14 and associated notes explains all the different cases of RF vs I2C conflict.
If you want to understand further the arbitration, you can read the application note AN5262 (https://www.st.com/resource/en/application_note/an5262-how-to-manage-simultaneous-ic-and-rf-data-transfer-with-an-st25dvxxk-device-stmicroelectronics.pdf).
The arbitration between RF and I2C doesn't cause any data corruption. When I2C is reading of writing data, the RF doesn't have access to the device.
Best regards.
2025-01-16 06:13 AM
Hello,
I understand your point.
I did an experiment trying to write with the ST25 app while running the code.
What is still puzzling me is that if I run the code one time the ST25 result is not accessible from the RF.
If I do it in loop, at some point the data get changed by the smartphone, but the RF shall be always off when the EEPROM is on.
Turn EEPROM on;
sleep RF;
wait RF OFF time;
Write 64 bytes with I2C;
Read 64 bytes with I2C;
Calculate CRC and identify if byte written are equal to written;
Turn EEPROM off;