cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3916B not detecting tags

smithderek2000
Associate III

Hello,

I ported the porting example to a different processor. The self tests are enabled and initialization passes. However I'm not able to read a tag. Logic captures (Salae) are attached. I've verified that I'm receiving interrupts and processing them. I also tested this hardware with an externally NUCLEO-L476RG board and off the shelf firmware and it could read the tags fine. Tags are very close to the antenna, within 1cm.

I noticed that when a 14443 tag is present, the number of interrupts increase, from about 15 per second without a tag, to 20 per second with a tag. But it never outputs the UUID of the tag itself. In the captures I observed that the interrupt gets serviced in about 20uSec.

Other than the platform files I tried to duplicate the demo firmware as closely as possible, leaving all the technologies enabled, not using ST25R_COM_SINGLETXRX, etc.

Thanks,

Derek

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Derek,

here there seems a problem in your SPI implementation:

0693W00000YAZaUQAX.pngHere should be the sending of REQB(RFAL_NFCB_CMD_SENSB_REQ) command (3 bytes 0x05 0x00 0x00). The TX length is correctly written: 0x18 which means three bytes but on writing the FIFO the first byte is not there. Similar I found everywhere in the trace: The st25r3916WriteFifo() does not cause sending of the correct bytes, sometimes the first one missing, sometimes the second and basically always shorter. I suspect and issue in the platformSpiTxRx() but please debug starting from st25r3916WriteFifo().

Best Regards, Ulysses

View solution in original post

6 REPLIES 6
Brian TIDAL
ST Employee

Hi Derek,

the Salae seems to be configured @2MS/s which is too small to properly sample the 1MHz SPI. Therefore, some clock pulses are missing and the SPI decoding is affected by the missing pulses. Would it be possible to provide a new trace with higher sampling rate?

By the way, can you provide some information about the MCU being used and whether an RTOS is being used? Can you also attach the platform.h file and the code where the discParam is initialized? What is the return code of rfalNfcDiscover( &discParam )? o you use the X-CUBE_NFC6 package on top of X-NUCLEO-NFC08A1?

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.
smithderek2000
Associate III

See attached. I checked through the bytes read and they look correct. Oddly I wasn't able to capture this fast a very new gaming PC, but instead a 10 year old Mac could do it.

MCU is an Texas Instruments MSP430F5419. No RTOS is being used, just a basic implementation. Other than initializing peripherals it's just running the RFAL polling demo code.

discParam is initialized in demoIni() and has everything enabled except: ST25R95 and DEMO_CARD_EMULATION_ONLY.

Return code of rfalNfcDiscover(&discParam) is ERR_NONE and demoIni() returns with a value of true (success). I renamed the demo_polling.c to rfal.c but tried to leave it alone as much as possible.

We're just using the X-CUBE_NFC6 package, polling demo. Initially I'm trying to do the minimum changes possible to get it to work. Once it's reading fine then I will clean it up and get rid of the unused technologies etc.

Much thanks,

Derek

Hi Derek,

here there seems a problem in your SPI implementation:

0693W00000YAZaUQAX.pngHere should be the sending of REQB(RFAL_NFCB_CMD_SENSB_REQ) command (3 bytes 0x05 0x00 0x00). The TX length is correctly written: 0x18 which means three bytes but on writing the FIFO the first byte is not there. Similar I found everywhere in the trace: The st25r3916WriteFifo() does not cause sending of the correct bytes, sometimes the first one missing, sometimes the second and basically always shorter. I suspect and issue in the platformSpiTxRx() but please debug starting from st25r3916WriteFifo().

Best Regards, Ulysses

smithderek2000
Associate III

Thank you, this is very helpful. Do you happen to have logic captures of what the initialization should look like? If not then I can hoop up the dev board and try to capture it, but I figure ST might have a gold standard reference that we can use to compare to.

Thanks.

Hi Derek,

sorry, nothing at hand. All I have will differ in one or the other small aspect. Better to compare pears with pears.

Ulysses

smithderek2000
Associate III

Thanks, I was able to set up a test of st25r3916WriteFifo() and was able to identify the issue. The MSP430 only has a one byte output buffer for SPI and the code was writing over the buffer before the byte was transmitted, so not all the bytes were sent. Once I fixed that the whole thing works; now I am able to read tags which is very nice. Thank you for your help.