cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3917 Felica not Detect

tk_sorad
Associate II
Hello,

I’m currently working on NFC detection using the ST25R3917 with Felica.

My system configuration is as follows:
PC Application ⇔ USB to I2C ⇔ ST25R3917

I’m running RFAL in the PC application and have extended rfal_platform.c to control the USB to I2C interface.

The current sequence of operations is:

1.rfalNfcInitialize();
2.rfalNfcDiscover(&discParam);
    memset(&discParam, 0x00, sizeof(discParam));
    discParam.compMode             = RFAL_COMPLIANCE_MODE_NFC;
    discParam.devLimit             = 1U;
    discParam.nfcfBR               = RFAL_BR_424;
    discParam.ap2pBR               = RFAL_BR_424;
    memcpy(&discParam.nfcid3, NFCID3, sizeof(NFCID3));
    memcpy(&discParam.GB, GB, sizeof(GB));
    discParam.GBLen                = sizeof(GB);
    discParam.notifyCb             = NULL;
    discParam.totalDuration        = 1000U;
    discParam.wakeupEnabled        = false;
    discParam.wakeupConfigDefault  = true;
    discParam.techs2Find          |= RFAL_NFC_POLL_TECH_F;
    discParam.isoDepFS             = RFAL_ISODEP_FSXI_128;
3.while(1) { rfalNfcWorker(); }

I have confirmed that rfalNfcfPollerGetCollisionResolutionStatus() is being called.
However, even when I bring an NFC tag close to the antenna, devCnt remains 0.

Are there any missing steps or additional configurations I should be aware of?

best regards.
This discussion is locked. Please start a new topic to ask your question.
1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi,

RFAL_ERR_BUSY means Operation ongoing. rfalGetFeliCaPollStatus returns RFAL_ERR_BUSY until the FeliCaPoll is completed. Once completed an RFAL_ERR_NONE is returned by rfalGetFeliCaPollStatus in case of success . Otherwise a ReturnCode such as RFAL_ERR_TIMEOUT is returned to indicate an error.

See  UM2890 - RF/NFC abstraction layer (RFAL) - User manual for further informations.

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,

can you share some detail on how the ST25R3917 IRQ pin is managed by the PC application? 

Thanks

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,

As you correctly assumed, the PC application is not able to handle interrupts directly.
Therefore, I am calling the st25r3916Isr function from within the st25r3916WaitForInterruptsTimed function.

do
{
    st25r3916Isr();
    status = (st25r2916interrupt.status & mask);
} while( ( (!platformTimerIsExpired( tmrDelay )) || (tmo == 0U)) && (status == 0U) );

 

best regards. 

Hi,

this will solve the interrupt handling within the st25r3916WaitForInterruptsTimed but not the overall interrupt handling.

Can you share some details about your USB to I2C bridge? Is it for example an Aardvark I2C/SPI Host Adapter? In such a case the bridge also provides GPIO capabilities and API to manage those GPIO. Then a dedicated thread in the application can wait for a change on the GPIO lines.

If your I2C bridge does not provide GPIO capabilities, you can change st25r3916GetInterrupt() to run st25r3916Isr() in addition to your changes in st25r3916WaitForInterruptsTimed(). See https://community.st.com/t5/st25-nfc-rfid-tags-and-readers/stsw-st25r-lib-using-spi-while-in-irq-context/td-p/728328 for a similar question.

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.

As you suggested, I added a call to st25r3916Isr() inside the st25r3916GetInterrupt() .
After that change, the function rfalGetFeliCaPollStatus() returns RFAL_ERR_BUSY at the line RFAL_EXIT_ON_BUSY( ret, rfalGetTransceiveStatus() );.

Do you have any idea what might be causing this?

Best regards.

Brian TIDAL
ST Employee

Hi,

RFAL_ERR_BUSY means Operation ongoing. rfalGetFeliCaPollStatus returns RFAL_ERR_BUSY until the FeliCaPoll is completed. Once completed an RFAL_ERR_NONE is returned by rfalGetFeliCaPollStatus in case of success . Otherwise a ReturnCode such as RFAL_ERR_TIMEOUT is returned to indicate an error.

See  UM2890 - RF/NFC abstraction layer (RFAL) - User manual for further informations.

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.