cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3920B Wake-Up Mode

JPortilha
Associate III

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

8 REPLIES 8
Ulysses HERNIOSUS
ST Employee

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

 

 

 

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

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.

  1. Typically in Reader mode it can use the Wake-up to sense the environment and after a de-tuning get an interrupt and start the reader mode (own field) to detect card and card emulation devices.
  2. Typically in Card emulation mode it will enable the field detector and wait for an external field. If the other device is a smartphone the smartphone will typically sense its environment and only emit a field when it has sensed a de-tuning.

BR, Ulysses

Hello,

I want to talk in reader mode. What configuration can I use?

 

BR. 

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

JPortilha
Associate III

I will try that and give you some feedback.

BR

JPortilha
Associate III

Hello, I have tried:

m_discParam.wakeupConfig.indAmp.delta = 2;
m_discParam.wakeupConfig.indAmp.reference = RFAL_WUM_REFERENCE_AUTO;

However, if I for example put my hand above the antenna the interrupt pins comes to 1 a lot of times in a short period of time, interrupting my main MCU. Is this behaviour normal? Is there a recommended way to reduce the sensitivity or attenuate these triggers? I can provide oscilloscope picture if needed.

BR.

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