2021-09-09 01:24 AM
I have STM32G070KB MCU connected with M24SR02-Y via I2C and GPO. I have no problem to write some NDEF message through I2C and then read it with my phone app. But what I need is to read actual (!!!) data with my phone. That means I write periodically some data in NFC tag through I2C.
But what I like is to write data by demand. As I see this pin GPO could be used to detect that RF session is started, and I tried to write at this moment some data into NFC Tag. But this action destroys RF session and phone app shows error.
Is there some way to update NFC Tag NDEF message “on the fly�? during RF request or not? Thanks.
Solved! Go to Solution.
2021-09-28 01:40 AM
Dear M24SR customer
The M24SR02 implements a communication mechanism through one Session token which is available either on the RF side or the I2C side, meaning that until the session token is released, only 1 side can have access to M24SR02. More details can be found in section 4.2 of the Datasheet.
The GPO interrupt configured in RF Session Open will be driven low if an RF Session is taking place. The rising edge of the GPO signal can then be used for the I2C Master to update the NDEF content in M24SR02. The negative edge of the GPO signal means in this case the phone is starting the communication with the tag and therefore should not be used for the I2C master to overwrite the NDEF content as the phone might be in the middle of doing the same.
Depending on the Smartphone OS/application capability, the RF Session can be closed either by deselecting the NDEF application, or by holding the phone sufficiently far from the tag to lose communication with the tag which automatically disables the RF session within the tag. When the smartphone comes back in the range of the tag, it would read again the tag NDEF content.
The I2C Master can control when to get the token either abruptly with a KillRFSession command or wait for the RF reader to close its RF session, with the GetSession command. It will release the token with the I2C token release sequence. Other means are listed in section 7.11 of the Datasheet.
With those means, the phone will be able to read newly updated content of the tag.
Have a good day
Regards
2021-09-28 01:40 AM
Dear M24SR customer
The M24SR02 implements a communication mechanism through one Session token which is available either on the RF side or the I2C side, meaning that until the session token is released, only 1 side can have access to M24SR02. More details can be found in section 4.2 of the Datasheet.
The GPO interrupt configured in RF Session Open will be driven low if an RF Session is taking place. The rising edge of the GPO signal can then be used for the I2C Master to update the NDEF content in M24SR02. The negative edge of the GPO signal means in this case the phone is starting the communication with the tag and therefore should not be used for the I2C master to overwrite the NDEF content as the phone might be in the middle of doing the same.
Depending on the Smartphone OS/application capability, the RF Session can be closed either by deselecting the NDEF application, or by holding the phone sufficiently far from the tag to lose communication with the tag which automatically disables the RF session within the tag. When the smartphone comes back in the range of the tag, it would read again the tag NDEF content.
The I2C Master can control when to get the token either abruptly with a KillRFSession command or wait for the RF reader to close its RF session, with the GetSession command. It will release the token with the I2C token release sequence. Other means are listed in section 7.11 of the Datasheet.
With those means, the phone will be able to read newly updated content of the tag.
Have a good day
Regards