cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-F401 to read ST25TV UID

Rance
Associate III

Hi ST Community

I have a ST25TV tag,The UID is E0 02 08 03 8F 65 C9 F5(8bytes)

I use the board of NUCLE0-NFC08A1 and the demo in NFC6 generated by Cube MX.

I can read the relevant information of the card through the SPI provided in the demo and  than print the UID of the card to the serial port(Figure1),

but I am unable to see the waveform related to the tag's UID on the logic analyzer. Could it be because the UID is encoded during transmission?

I cannot find the corresponding UID in the waveform diagram.

How can I obtain the UID by analyzing the waveform?

 

Figure1:

Rance_0-1727358774182.png

FIFO data:

Rance_1-1727358885913.png

waveform:

Rance_2-1727358937104.png

 

 

 

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi,

what you see on the SPI trace is the manchester stream between the reader and the tag. This stream of data in then decoded by the FW.

You can decode it by porting rfal_iso1693_2.c in your environment.

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

11 REPLIES 11
Brian TIDAL
ST Employee

Hi,

what you see on the SPI trace is the manchester stream between the reader and the tag. This stream of data in then decoded by the FW.

You can decode it by porting rfal_iso1693_2.c in your environment.

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.

Should I decode the data read from the FIFO using the APIs in rfal_iso1693_2.c?

Or, is there any other data that needs to be decoded?

 

Brian TIDAL
ST Employee

Hi,

you can directly decode the data read from the FIFO. Just one question, why do you want to decode those data from the SPI whereas the MCU decodes those data? Can you describe the use case?

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,

Because I need to communicate with the ST25R3916B using the I²C protocol via an STC8 series microcontroller, and due to the lack of example code, I have to figure out on my own which ST25R3916B register addresses I should operate on, and how to correctly process the data received in the FIFO to obtain the UID from the tag.

Hi,

the NFC RF Abstraction Layer (aka RFAL) and associated demos are written in C and can ported to non-ST MCU in accordance with the Software Licence Agreement. If I2C is needed, this interface can be selected through STM32CubeMX (of course some 0 Ohm resistors needs to be modified on the board as described in the UM2616 user manual). This enables RFAL_USE_I2C to communicate over I2C.

I would suggest to port the RFAL middleware rather than writing you own code. See also UM2890 - RF/NFC abstraction layer (RFAL) - User manual

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.

The other night, you answered my question in the ST community and mentioned that I could use 'rfal_iso15693_2.h'. I did use it, but it seems I still can't decode.

This is the serial information printed out from my function calls in rfal_iso15693_2.h.

Rance_0-1727526721421.png

Rance_1-1727526821666.png

Rance_2-1727526856794.png

The function does not decode this data into a UID.

Hi,

this serial log is intended to display debug information such as current bytes to be decoded from the input buffer while processing the manchester frame. The decoded result is inside the output buffer (outBuf). I can see from your log the final "OK" from line 392 that proves that the decode fonction returns RFAL_ERR_NONE and that the outBuf contains the decoded data.

Please note that ISO15693 data are transmitted LSByte first and therefore for an UID= E0 02 08 03 8F 65 C9 F5, the buffer will contain F5 C9 65 up to E0.

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 Brian,

First of all, thank you very much for solving my problem. I did indeed see the decoded UID in the ‘outbuff’.

Rance_0-1727580325171.png

 

However, I would like to know what the 0th and 1st bits, as well as the 10th and 11th bits, refer to.

I'm guessing that the 0th and 1st bits refer to SOF, and the 10th and 11th bits refer to EOF.

So, that means the 0th and 1st bits, as well as the 10th and 11th bits, are the same for all tags in the same series, right?

 

 

 

Secondly, I have another question regarding the blocks on the TAG.

Rance_3-1727584104353.png

This is the decoded data.

Rance_1-1727583158736.png

So, how can I find that the data in the block is 00000000?

 

 

Hi,

I am not sure to understand the first question about 0th and 1st bits and SOF/EOF. Each frame is delimited by a SOF and a EOF. When using 1 subcarrier in ISO15693, the SOF consists of 3 times a 18.88µs unmodulated time followed by 3 times 8 pulses followed by a 18.88µs unmodulated time + 8 pulses. This is received as 1 1 1 0 1 and seen as 17h in the FIFO. SOF and EOF are specified by the ISO15693-2. Tags compliant with this standard use this framing.

For the second question, make sure to print the outBuf once the processing has been completed. The various bytes of the outBuf are modified on the fly while decoding the manchester stream.  Also, the response to a READ SINGLE BLOCK starts with 8-bits response flags followed by the block of data (usually 4 bytes) followed by a 2-bytes CRC. The data in the outBuf are 00(flags) 00000000(4-bytes block) 77CF(CRC).

Again I would recommend to base you development on top of the RFAL that abstracts all the low layers complexity.

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.