cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3920B appears RFAL ERR INTERNAL in the field on process

zhangxixun
Associate II

Hello,

In the process of using ST25R3920B as a card reader, if the value of RFO is modulated to 0, there will be an RFAL ERR INTERNAL error, and the card reader will not be able to read NFC cards. Changing the value of RFO to 0x03 can not detect the existence of the card.

What is the reason for this RFAL ERR INTERNAL error? How can I adjust the value of RFO to make the card reader return to normal and read the card again?

zhangxixun_1-1753081735453.png

 

zhangxixun_0-1753081702068.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

Check your implementation of platformProtectST25RIrqStatus/platformUnprotectST25RIrqStatus and platformProtectST25RComm/platformUnprotectST25RComm. Feel free to provide more information on how this is implemented. Also make sure the ST25R IRQ handler is not stuck on MCU side due to IRQ priority issue (e.g. toggle a GPIO pin when entering the interrupt handler and toggle it again when exiting the handler)

I suggest to connect a logic analyzer on SPI (CLK, MOSI, MISO, BSS) pins and ST25R IRQ pin and to provide the log file.

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

11 REPLIES 11
Brian TIDAL
ST Employee

Hello,

  • Which firmware package is used: X-CUBE-NFC6 or the ST25 embedded library?
  • Which MCU platform is in use?
  • Is the ST25 interrupt enabled, and is the st25r3916Isr() handler properly called when the interrupt is signaled?
  • Can you enable the ST25R_SELFTEST and ST25R_SELFTEST_TIMER compilation switches to verify that your port is correct?

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.
Ulysses HERNIOSUS
ST Employee

Hi,

 

the reason is further down in the code: 

    if( (ST25R3916_IRQ_MASK_CAC & irqs) != 0U )        /* Collision occurred */
    {
        err = RFAL_ERR_RF_COLLISION;
    }
    else if( (ST25R3916_IRQ_MASK_APON & irqs) != 0U )
    {
        /* After APON wait for CAT interrupt, indication field was switched on minimum guard time has been fulfilled */
        irqs = st25r3916WaitForInterruptsTimed( ( ST25R3916_IRQ_MASK_CAT ), ST25R3916_TOUT_CA );

        if( (ST25R3916_IRQ_MASK_CAT & irqs) != 0U )                             /* No Collision detected, Field On */
        {
            err = RFAL_ERR_NONE;
        }
    }

 

Neither CAC nor APON interrupt are coming -> Is your interrupt handling in MCU working properly? Did you enable ST25R_SELFTEST and successfully run through the initialization?

I am not following your description of RFO value. Which value, where? RFO is in the first place the antenna output pin of ST25R3916B/20B.

Regards, Ulysses

zhangxixun
Associate II

 firmware package is x-cube-nfc6.

RFO refers to the driving impedance RFO.When I set the RFO impedance value to 0, the card reader can't read the card. And the IRQ pin of the 3920B chip is abnormal and keeps pulling high.

When the antenna is not connected, the card is not close, and the IRQ pin of 3920B is always pulled high.

 

Hi,

Make sure the ST25 interrupt is enabled on the MCU, and that st25r3916Isr() handler is properly called when the interrupt is signaled.

ST25R_SELFTEST will helps you to check that the ST25 interrupt is properly handled.

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.
zhangxixun
Associate II

I turned on ST25R_SELFTEST and ST25R_SELFTEST_TIMER, and the initialization failed.Does this mean that the fault lies not in the software but in the hardware?

 

zhangxixun_0-1753147405372.png

 

zhangxixun
Associate II

Hi

I use ST25R_SELFTEST and ST25R_SELFTEST_TIMER to check my program,but both failed.

ST25R_SELFTEST returns RFAL_ERR_TIMEOUT,
ST25R_SELFTEST_TIMER returns RFAL_ERR_SYSTEM (2nd).

What is the reason for this error, and how should I solve this error?

Thanks, zhang

zhangxixun_0-1753169415592.png

zhangxixun_1-1753169423857.png

 

 

Hi,

Check the following:

  1. The ST25R3920B IRQ pin is properly connected to one pin of the MCU.
  2. This pin of the MCU is configured as an external interrupt.
  3. This external interrupt is enabled.
  4. The interrupt handler for this interrupt calls st25r3916Isr().

Provide additional information about your platform:

  • Are you using your own board or an STM32 Nucleo board connected to the ST25R3920B?
  • Which MCU is used in your application?

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,

please read the comments around these places. Here the code will test

  1. if interrupts are received and signaled to the main layer
  2. if the timer handling is about right. Not too fast and not too slow.

If you fail on any of these you need to look into your ISR and your timer porting.

Ulysses

zhangxixun
Associate II

The function st25r3916Isr () was called only once during initialization, and was not called when an error occurred.
The MCU is NXP S32K1.