cancel
Showing results for 
Search instead for 
Did you mean: 

How to use FTM to READ mailbox using a X-NUCLEO-NFC03A1 kit?

lcopparoni
Associate III

Hello,

I'm facing problems thinking about how to read RF data using my 03A1 reader using FTM.

My main point is to see if I can decrease RF reading times of a message (8 bytes, so really short) using the ISO15693 standard.

My first firmware uses 04A1 tag and 03A1 reader, and it's fine, it needs about 80ms to complete the reading/decoding of the NDEF message via RF reader, reading the tag's EEPROM.

I was asking myself if it's possible to reduce more this reading time, and I'm struggling in understanding how to read RF data from the 04A1 mailbox using my 03A1 reader.

I currently use an Arduino board with Arduino libraries from ST, which lets me configure and write messages to the mailbox via I2C.

The main question is: how to read this mailbox using the reader via RF?

The library seems not talking about this, only refers to tag mailbox and MCU tag side.

I found the embedded library described in the file AN5512, but it only works using STM Cube. Do I need to use it? Is this the only way?

Thank you so much, I'm very confused at this time.

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi,

the FTM communication does not rely on NDEF. Basically, you can consider the FTM as being a RAM mailbox that can be accessed by RF and I2C interfaces. The content of this mailbox is whatever you want (with only a limitation on the maximum message length when using ST25R95/CR95HF: as the ST25R95 transmit buffer can only handle 255 bytes, this limits the payload length. In the demo, this is limited to 251 bytes).

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
Brian TIDAL
ST Employee

Hi,

the rfal_st25xv module provides the various API that can be used by ST25R Readers for communication with ST25DV tags and management of the FTM:

  • rfalST25xVPollerPresentPassword
  • rfalST25xVPollerWriteDynamicConfiguration
  • rfalST25xVPollerReadMessageLen or rfalST25xVPollerFastReadMsgLength
  • rfalST25xVPollerReadMessage or rfalST25xVPollerFastReadMessage

rfalST25xVPollerFastReadMessage uses a doubled data rate and therefore significantly reduces the reading time (see ST25DV04K ST25DV16K ST25DV64K datasheet for details about fast commands) sur as Fast Read Message).

Examples can be found inside the ST25 Embedded NFC library in the FTM demo of the X-NUCLEO_NFC03A1. This library also provides ready to use FTM demo for STM32 based MCU boards.

See also https://community.st.com/s/question/0D53W000004m5e4SAA/can-anyone-provide-an-example-of-api-rfalst25xvpollerreadmessage

Note that you can also reduce the reading time of the eeprom by using rfalST25xVPollerFastReadSingleBlock or rfalST25xVPollerFastReadMultipleBlocks

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi, thank you for your response.

So I should be able to read RF messages using those functions reader side.

I read the post you linked from the ST community. From what I understood, reading datasheets related to the mailbox and FTM, I should be able to execute steps from 1 to 4 from that ST community post, using I2C and the host MCU which writes the message in the mailbox.

From there, steps 5 and 6 should be done via RF reader side, to read the mailbox and unlock the message, which can then be overwritten with a new one.

For steps 1 to 4 I quote:

  1. Open RF user security session with rfalST25xVPollerPresentPassword with pwdNum=0 (RF_PWD_0), pwd=your passwd and pwdLen=8
  2. Authorize the enabling of the MB (set MB_MODE bit to 1 in MB_MODE register thanks to rfalST25xVPollerWriteConfiguration)
  3. Read the current value of the MB_CTRL_Dyn register with rfalST25xVPollerReadDynamicConfiguration
  4. set MB_EN bit to 1 and write the updated value to MB_CTRL_Dyn register with rfalST25xVPollerWriteDynamicConfiguration

Obviously, for step 1, I should replace the RF security session with a I2C security session.

For steps 5 to 6 (RF reader side)

  1. read the length of the mailbox message with rfalST25xVPollerReadMessageLength or rfalST25xVPollerFastReadMessageLength (double speed)
  2. read the mailbox message with rfalST25xVPollerReadMessage or rfalST25xVPollerFastReadMessage

Did I understood correctly?

Thank you

Brian TIDAL
ST Employee

Hi,

your understanding is correct.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you so much.

Just​ one last question: before reading the mailbox with the reader through RF, does the reader need a sort of initialization? Because for example, in the nucleo nfc03a1 demo there's an ndef context initialization and some other functions used to get the reader ready to communicate and read tag's eeprom. I suppose in this case the ndef standard is not used, but anyway I get this doubt.

Reading the various files available in the library I'm getting confused. ​

Brian TIDAL
ST Employee

Hi,

the FTM communication does not rely on NDEF. Basically, you can consider the FTM as being a RAM mailbox that can be accessed by RF and I2C interfaces. The content of this mailbox is whatever you want (with only a limitation on the maximum message length when using ST25R95/CR95HF: as the ST25R95 transmit buffer can only handle 255 bytes, this limits the payload length. In the demo, this is limited to 251 bytes).

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.