cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3911B ERROR FRAMING in reception

PDe G.19
Associate II

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

15 REPLIES 15
Ulysses HERNIOSUS
ST Employee

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.

I have the same issue, but I don't know how to change optimization level to -O3 as you say.

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.

0693W000007E3JWQA0.pngBest Regards, Ulysses

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:

  • There are combinations of two NFCA tags that allways work perfectly (ERR_NONE) and found all the tags.
  • There are combinations of two NFCA tags that allways fails.

When a combination allways fails:

  • If I have optimize for size (-Os) error is allways ERR_FRAMING (in the same place as PDe), and if I call anticollision function again, it just found 1 tag (but there are two!).
  • If I have optimize most (-O3) error is allways ERR_INCOMPLETE_BYTE, if I call anticollision function again, error is ERR_TIMEOUT, if I call it again, ERR_INCOMPLETE_BYTE, ...
  • All tags works fine, when just one is present.

0693W000007E3p3QAC.png

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:

  • Which functions are you calling with which parameter?
  • At which frames do yo observe this behavior? REQA/SENS_REQ or anticollision/SDD_REQ or SELECT/SEL_REQ? Our collision resolution functions are built to be able to cope with multiple tags.

Best Regards, Ulysses