cancel
Showing results for 
Search instead for 
Did you mean: 

How to read the NDEF message? (M24SR04-Y)

PPost
Associate II

I have a microcircuit M24SR04-Y, on which I recorded information using the NFC.

I need to read this information using i2c.

I read the datasheet and understood the circuit of communication with the microcircuit.

But I am a novice and without an example it is very difficult to understand.

Tell me how and in what form to send commands. If you show an example of communication with the chip, it will be great.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Rene Lenerve
ST Employee

Hi postnikovpasha1,

The M24SR behaves on the I²C side as for RF communication, thus to access the contents of the memory it is necessary to use a protocol identical to the ISO14443. You need to open a session, select application, select NDEF file ..., to read or write memory. Done in the examples above.

From the NFC1 examples you can reuse M24SR drivers and NDEF middleware in you code. You should not have too much rework on the files (but hard to say as you give no information) .

  • Drivers/BSP/Components/M24SR probably reusable as is.
  • Drivers/BSP/X-NUCLEO-NFC01A1 can be reused but need to be adapted to your environment.
  • Middlewares\ST\lib_NDEF probably can be reusable as is.

The file lib_wrapper may help you to follow calling from middleware lib to M24SR drivers.

Hope this can help you.

Regards.

View solution in original post

3 REPLIES 3
Rene Lenerve
ST Employee

Hi postnikovpasha1,

You can find some source code examples and documentation on st.com, for the I²C communication with an M24SR.

Here after are some links to help you :

This example is based on the MCU Cube environment from STM32.

This example is based on the Standard Peripheral lib, from STM32 MCU.

Hope this will be useful for you.

Regards.

Hi Rene Lenerve,

Thank you very much!

The fact is that these libraries and examples are strongly tied to the STM32.

I am not able to pull out the necessary information from there.

Rene Lenerve
ST Employee

Hi postnikovpasha1,

The M24SR behaves on the I²C side as for RF communication, thus to access the contents of the memory it is necessary to use a protocol identical to the ISO14443. You need to open a session, select application, select NDEF file ..., to read or write memory. Done in the examples above.

From the NFC1 examples you can reuse M24SR drivers and NDEF middleware in you code. You should not have too much rework on the files (but hard to say as you give no information) .

  • Drivers/BSP/Components/M24SR probably reusable as is.
  • Drivers/BSP/X-NUCLEO-NFC01A1 can be reused but need to be adapted to your environment.
  • Middlewares\ST\lib_NDEF probably can be reusable as is.

The file lib_wrapper may help you to follow calling from middleware lib to M24SR drivers.

Hope this can help you.

Regards.