cancel
Showing results for 
Search instead for 
Did you mean: 

Solved: Cannot write M24SR after MCU read

joaquim
Associate III
Posted on April 08, 2014 at 15:49

Hello everybody,

I have my M24SR working with my MCU 🙂 I can read the contents of the tag. However, after a read from MCU, I cannot write the tag if I do not remove power from it. I have performed the DESELECT command and also DE_INIT my I2C. All the communication procedure takes place perfectly.

The tag is connected to MCU by means of the two I2C wires, one VCC and one GND. I do not have GPO since to save one pin I work by polling.

Have a nice day and let me know your opinions about this subject! 🙂

#m24sr #deselect #m24sr #m24sr #nack #m24sr #gpo #ack
1 ACCEPTED SOLUTION

Accepted Solutions
Anais GALLIGANI
Senior II
Posted on May 07, 2014 at 15:21

Hello ,

Regarding I2C protocol, a NACK must be send before the STOP at the end of the M24SR Answer read (answer only). Anyway if a ACK is sent before a STOP, this can work … but sometimes, depending on data to be read, it can not work. This is due to I2C protocol specification.

So there will be some change in the next release of the Datasheet.

Have a nice day,

Best regards,

ST e2e online support

View solution in original post

8 REPLIES 8
Anais GALLIGANI
Senior II
Posted on April 09, 2014 at 14:21

Hello,

Might you please tell us what is the error code that is appearing??

thanks a lot,

have a nice day,

best regards,

ST NFC/RFID Dynamic tag support

joaquim
Associate III
Posted on April 09, 2014 at 17:29

Hi,

I did not pretend to be this ambiguous on purpose, sorry. It is just at the end of a READ by the MCU, the phone does not even detect the tag when I try to interact next time.

I have observed physically disconnecting and reconnecting the SDA line solves this issue. Thus, I have 2 questions:

  1. May the pull-up state of SDA be preventing the tag from answering to phone?
  2. During an answer from the tag, to MCU sends an ACK back to the tag for each byte correctly received. However, the last one in a row is a NAK. Which is the purpose of the NAK at the end?

Have a nice day.

--

joaquim
Associate III
Posted on April 10, 2014 at 17:07

Solved! I was not building correctly the DESELECT command.

However, there is still the question of the final NAK sent by the MCU to the TAG in several answers to SELECTs. Is this really this way?

Please let me know.

Anais GALLIGANI
Senior II
Posted on April 10, 2014 at 18:20

Hi,

don't be 🙂 and thanks for your answer,

Just in order to be sure to understand properly , another question, sorry about that

Might  you confirm if you read the answer of the  M24Sr after deselect ?

otherwise the i2c cession is not closing and it is not possible to access to RF .

thanks

have a nice day,

best regards

st nfc/rfid dynamic tag support

joaquim
Associate III
Posted on April 10, 2014 at 22:26

Hi, I cannot see your name so I will call you NFC/RFID Dynamic Tag Support 🙂

Yes, sure, no problem in receiving the DESELECT answer. However, in an application note named something like ''Storing data ni the M24SR memory'', there are NAKs at the end of each command answer.

Is this an error?

joaquim
Associate III
Posted on April 22, 2014 at 09:35

Good morning,

I think the highlighted areas represent errors in the datasheet.

Am I right? I implemented this with ACKs and it works but not with final NAKs.

0690X00000605cEQAQ.png

Please let me know.

Anais GALLIGANI
Senior II
Posted on May 07, 2014 at 15:21

Hello ,

Regarding I2C protocol, a NACK must be send before the STOP at the end of the M24SR Answer read (answer only). Anyway if a ACK is sent before a STOP, this can work … but sometimes, depending on data to be read, it can not work. This is due to I2C protocol specification.

So there will be some change in the next release of the Datasheet.

Have a nice day,

Best regards,

ST e2e online support

henri
Associate
Posted on August 07, 2014 at 11:44

Hi Kazola, Hi all!

I'm newbie with NFC/RFID Tag but I need to use the M24SR64 with my MSP430 using I2C protocol. My projet is a basic one, I just want to write dynamically 3 bytes using MSP430 then retrieve them with a phone/reader in RFID.

I can understand in your previous posts that you planned to use an MSP430 too. As your project seems to work 🙂 can you give me some advices to simply write my 3 bytes in the memory (NDEF message i suppose) ? Did you adapt the c/h file provided by ST with the demo board to your µC?

Thx a lot! 🙂