cancel
Showing results for 
Search instead for 
Did you mean: 

I am having difficulty reading tags

Dcowa.1
Associate II

Hi,

I’m trying to use the CR95HF in what I think should be the simplest mode. Reading a 14443a tag.

I am controlling it from a pic micro. I have detailed exactly what I have done. Clearly the SPI is working but I am also missing something. Really appreciate it if somebody could have a look and suggest where I may have been going wrong. I know I have not been poling but I have been leaving quite a long time ( several seconds) between sending and attempting to receive. The board is bespoke but built according to ST recommendations. I have checked and there is a strong signal in the antenna.

1.      Reset

 Asserting Chip Select

Send 0x01

De asserting Chip Select

2.      Next I cyc le the /irq_in while SSI_0=1 and SSI_1=0 to select SPI mode

3.      To check the comms are working I do and IDN command

Assert Chip Select

Send 0x00                                                          Select direction from micro to CR95HF

Send 0x01                                                          Select IDN command

Send 0x00                                                        No additional bytes sent

De-assert Chip Select

Wait 1s

Assert Chip Select

Send 0x02

Get Data Length byte =0x0d

Get Data (13 times)

De-assert Chip Select

Result is correct “NFC FS2JAST4�?

4.      Next I need to select a protocol

Assert Chip Select

Send 0x00                                          direction from micro tom CR95HF

Send 0x02                                        set protocol command

Send 0x02                                        send 2 bytes

Send 0x02                                          select 14443A

Send 0x00                                          other parameter

De-assert chip select

Wait 1s

Assert chip select

Send 0x02                                          select direction from CR95HF to micro

Get byte                                           error code (0x00 as expected)

Get byte                                            No of bytes (0x00 as expected)

De assert chip select

5.      I programmed a 14443a tag using my phone with a string

6.      Next I tried to read it. It was placed on top of the loop

Assert the chip select

Send byte 0x00                               set direction from micro to CR95HF

Send byte 0x04                               send SENDRECEIVE command

Send byte 0x00                                no additional parameters

De-assert chip select

Wait 1s

Assert chip select.

Send byte 0x02                                set direction from CR95HF to micro

Read byte                                         comes back with 0x00 so no error

Read Byte                                        comes back with zero so no bytes were read

De-assert chip select.

10 REPLIES 10

Hi David,

ISO14443-A does not specify the application layer - even if the card has memory or how it is accessed.

For that you will need to know what kind of tag you want to access and which protocol set it talks. NFC Forum defines two different command sets for talking to ISO14443A tags: T2T and T4T. For that I recommend you to get the relevant specs:

e.g. NFC Forum specs "Digital Protocol", "Type 2 Tag" and "Type 4 Tag" specifications.

The RFAL used in e.g. NFC03 abstracts some of these procedures but I recommend to get at least basic knowledge about the various NFC protocols.

However these are just two possible application definitions. Various other use cases (e.g. payment, passport, etc.) define their own commands and command structures.

If you want to address specific tags I recommend to read the datasheet from the manufacturer.

Regards, Ulysses