2025-07-21 12:09 AM
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?
Solved! Go to Solution.
2025-07-24 4:36 AM - edited 2025-07-24 4:37 AM
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
2025-07-21 12:22 AM
Hello,
st25r3916Isr()
handler properly called when the interrupt is signaled?Rgds
BT
2025-07-21 12:28 AM
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
2025-07-21 2:23 AM
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.
2025-07-21 2:32 AM
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
2025-07-21 6:25 PM
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?
2025-07-22 12:32 AM
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
2025-07-22 12:40 AM
Hi,
Check the following:
Provide additional information about your platform:
Rgds
BT
2025-07-22 1:09 AM
Hi,
please read the comments around these places. Here the code will test
If you fail on any of these you need to look into your ISR and your timer porting.
Ulysses
2025-07-24 2:43 AM
The function st25r3916Isr () was called only once during initialization, and was not called when an error occurred.
The MCU is NXP S32K1.