2025-07-30 9:25 AM
Hello,
I am using the ST25R3920B NFC reader in wake-up. My goal was the interrupt pin only came to 1 when it detected the presence of a smartphone (or other strong RF fields), however currently the interrupt pin comes to 1 periodically without any RF sources close enough. This is my current configuration:
if (rfalNfcGetState() != RFAL_NFC_STATE_IDLE)
rfalNfcDeactivate(RFAL_NFC_DEACTIVATE_IDLE);
/* Retrieve default discovery parameters */
rfalNfcDefaultDiscParams(&m_discParam);
//m_discParam.notifyCb = m_fncPollNotification;
m_discParam.p2pNfcaPrio = true;
m_discParam.totalDuration = 1000;
m_discParam.techs2Find = flags;
m_discParam.wakeupEnabled = true;
m_discParam.wakeupConfigDefault = false;
/* Wake up mode configurations */
m_discParam.wakeupConfig.period = RFAL_WUM_PERIOD_50MS; // Check every 800 ms
m_discParam.wakeupConfig.swTagDetect = false;
m_discParam.wakeupConfig.irqTout = false;
/* ST25R3920B does not support capacitive sensing */
m_discParam.wakeupConfig.cap.enabled = false;
m_discParam.wakeupConfig.indPha.enabled = false;
m_discParam.wakeupConfig.indAmp.enabled = true;
m_discParam.wakeupConfig.indAmp.autoAvg = true;
m_discParam.wakeupConfig.indAmp.delta = 50;
m_discParam.wakeupConfig.indAmp.aaWeight = RFAL_WUM_AA_WEIGHT_8;
m_discParam.wakeupConfig.indAmp.reference = 200;
m_discParam.wakeupConfig.cap.reference = RFAL_WUM_REFERENCE_AUTO;
m_discParam.wakeupConfig.indPha.reference = RFAL_WUM_REFERENCE_AUTO;
m_pollDuration = duration;
ReturnCode rc = rfalNfcDiscover(&m_discParam);
if (rc != ERR_NONE)
{
platformLog("rfalNfcDiscover, with ret=0x%x\n", (uint8_t) rc);
return -EBUSY;
}
rfalNfcWorker();
int ret = gpio_pin_interrupt_configure(NFC_IRQ_PIN.port, NFC_IRQ_PIN.pin, GPIO_INT_ENABLE);
if(ret != 0)
return ret;
gpio_init_callback(&callbackDataNFC, NFCGpioCallback, BIT(NFC_IRQ_PIN.pin));
ret = gpio_add_callback(NFC_IRQ_PIN.port, &callbackDataNFC);
Am I doing something wrong?
BR
2025-07-31 12:39 AM
Hi JPortilha,
You are misunderstanding what the wake-up system. It will periodically detect changes in the environment - either in the antenna or the capacitive plates.
Please study the data sheet and AN5320.
The reason for it immediately waking up is the arbitrary reference of 200 which you are setting. You should have used here also RFAL_WUM_REFERENCE_AUTO.
What you describe is the field detector. In RFAL it will be activated automatically with the Card Emulation/Listen mode.
But please beware that phones typically will not emit a field if they don't sense a change in the environment (similar to the ST25R3916B inductive wake-up mode).
BR, Ulysses
2025-07-31 1:28 AM
Hello,
I'm not sure I fully understood your point. My goal is to have the interrupt pin go high and wake up the MCU only when a smartphone is detected. Is that possible to achieve? If so, could you please advise on the correct configuration to use?
BR
2025-07-31 1:45 AM
Hi,
I am not understanding your goal either: What are you trying to achieve? In which mode do you want to talk to the smartphone?
As said, the ST25R3916B has two main modes. Reader mode and Card emulation mode.
BR, Ulysses
2025-07-31 2:07 AM
Hello,
I want to talk in reader mode. What configuration can I use?
BR.
2025-07-31 3:36 AM
Hi,
basically the one you are showing. In a first step you can also let it use the default configuration. In your config I see currently two issues, the mentioned reference and the huge delta, better to to 2-10.
Ulysses
2025-07-31 7:51 AM
I will try that and give you some feedback.
BR
2025-07-31 8:54 AM
Hello, I have tried:
2025-08-01 1:12 AM
Hi,
this is expected. You can reduce sensitivity/reactivity by: increasing delta, reducing weight and maybe also a bit by increasing period.
Anything that de-tunes the antenna LC tank may be detected depending on the mentioned sensitivity settings.
Ulysses