2019-02-22 03:29 AM
Hi,
i'm trying to perform a communication with an ISO14443-A smart card using the X-NUCLEO-NFC06A1 expansion board. The smart card supports the following bit rate: 106, 212, 424 and 848 kbit/s according to the ATS received. If i negotiate with the smart card a 848 kbit/s bit rate both in transmission and reception and i try to send an APDU, the rfal library returns an ERROR FRAMING in reception. In particular the error is returned by rfalTransceiveRx() method implemented in rfal_rfst25r3911.c file:
case RFAL_TXRX_STATE_RX_WAIT_RXE:
irqs = st25r3911GetInterrupt( (ST25R3911_IRQ_MASK_RXE | ST25R3911_IRQ_MASK_FWL | ST25R3911_IRQ_MASK_EOF) );
if( irqs == ST25R3911_IRQ_MASK_NONE )
{
/*******************************************************************************/
/* REMARK: Silicon workaround ST25R3911B Errata #1.1 */
/* ST25R3911 may indicate RXS without RXE afterwards, this happens rarely on */
/* corrupted frames. */
/* SW timer is used to timeout upon a missing RXE */
if( rfalTimerisExpired( gRFAL.tmr.RXE ) )
{
gRFAL.TxRx.status = ERR_FRAMING;
gRFAL.TxRx.state = RFAL_TXRX_STATE_RX_FAIL;
}
/*******************************************************************************/
break; /* No interrupt to process */
}
It seems that the chip does not receive the end of frame and a timer interrupt occurs. If, instead, the bit rate is set to 424 kbit/s no problem occurs. Is there someone could explain me why this happens? Moreover, where i can find the ST25R3911B Errata #1.1?
Thanks in advance. Best regards,
Pierluigi
Solved! Go to Solution.
2019-03-13 07:47 AM
Summary of the communication in private channel:
Issue disappears when going to optimization level -O3. At high bitrates it is also advisable to increase SPI speed to e.g. 4MHz.
2021-02-04 10:51 AM
I have the same issue, but I don't know how to change optimization level to -O3 as you say.
2021-02-04 11:30 PM
Hi EBadi.2,
which MCU + toolchain are you using?
Typically you need to go to Options/Properties of your build target and look around in the C/C++ settings. As example I attach where to find in STM32CubeIDE.
Best Regards, Ulysses
2021-02-05 12:36 AM
Thanks for your reply Ulyssses but my issue is not getting fixed. It might be a different problem.
What I'm doing is to perform anticollision with 1 or 2 NFCA tags present.
When performing anticollision with just one tag, the function does never report an error and allways find 1 tag correctly.
When performing anticollisiion with two tags:
When a combination allways fails:
2021-02-05 12:57 AM
Hi EBadi.2,
I propose you create a separate ticket for this behavior. I have some ideas but would also need some more information which you could post in this separate ticket:
Best Regards, Ulysses
2021-02-05 01:06 AM