cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3916 Wake-up mode

MPeli.1
Associate III

Hello,

i have been trying to put the st25r3916 in wake-up mode but i detect high power consumptions (around 900 uA). I am using a very basic code just to test current consumtion, i2c communication seems to work, but maybe i am missing some parts.

int main(){
       rfalAnalogConfigInitialize();
 
	if(rfalInitialize() != ERR_NONE)
	{
 
	}
	else
	{
		rfalWakeUpModeStart(NULL);
        }
}

Am i missing some api calls?

Thanks,

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
Grégoire Poulain
ST Employee

Hi,

Looking into the I2C trace provided before it seems that the external IRQ handling on your setup is not properly set.

DateTime: 2020-02-21T11:11:14.583
Start, hA0 [ h50 | WR ], hC1, Stop
Start, hA0 [ h50 | WR ], h7F, 
Restart, hA1 [ h50 | RD ], h2A NAK, 
Restart, hA0 [ h50 | WR ], hFC, h44, 
Restart, hA1 [ h50 | RD ], h00 NAK, Stop
Start, hA0 [ h50 | WR ], hFC, h04, h10, Stop
Start, hA0 [ h50 | WR ], h42, 
Restart, hA1 [ h50 | RD ], h00 NAK, 
Restart, hA0 [ h50 | WR ], h42, 
Restart, hA1 [ h50 | RD ], h00 NAK, Stop
Start, hA0 [ h50 | WR ], h02, h80, Stop
/* ==> IRQ Status Registers should have been read here triggered by IRQ pin (register h1A) */
Start, hA0 [ h50 | WR ], h16, h80, Stop

Please ensure that the ISR and external Interrupt source is functional on your platform.

If the ISR is not serviced (interrupt status Registers read) the IRQ pin will remain high at startup and you will not be able to see any transition when setting the Wake-up mode.

Best regards

GP

View solution in original post

52 REPLIES 52
Grégoire Poulain
ST Employee

Hi,

The initialization process is not handled correctly, the Wake-up is set only if the RFAL initialization failed.

In order to initialize the RFAL you must initialize the Analog Configs and the RFAL itself.

If the rfalInitialize() returns an error it is due to some system issue and communication with the ST25R3916 were not successful.

Can you confirm that the rfalInitialize() is OK?

The code should be changed to something like:

int main()
{
 
    /* Configure and initialize all required peripherals */
    /* ... */
 
    rfalAnalogConfigInitialize(); 
    if( rfalInitialize() != ERR_NONE )
    {
        /* System error - unable to initialize ST25R3916 */
        
        /* Block MCU / signal error / return error */
    }
 
 
    /* RFAL initilization OK, continue with application */
    
    /* Set ST25R3916 in Wake-up mode */
    rfalWakeUpModeStart(NULL);
    
    /* ... */
}

Kind regards

GP

MPeli.1
Associate III

Yes, rfalInitialize() returns ERR_NONE, so it is OK. The problem is that rfalWakeUpModeStart(NULL); seems to have no effect, because power consumption stays at 900uA.

Grégoire Poulain
ST Employee

Hi,

Could you please provide more details on your setup?

  • Which RFAL version are you using ? (RFAL_VERSION in rfal.h)
  • Which HW setup are you using ? X-NUCLEO-NFC06A1 / ST25R3916-DISCO / other ?
  • How are you measuring the current?
    • How/Where are you supplying and monitoring the ST25R3916 consumption?
    • How are you excluding consumption of other components on the board (MCUs, LEDs, etc) ?
    • The WU mode performs actions periodically (every few ms), instant currents can be misleading.

This Application Note provides further details on the Wake-up mode of the ST25R3916 and might be helpful.

Best regards

GP

MPeli.1
Associate III

Hello,

I am using latest rfal downloaded by st website, 2.1.2, as stated in rfal_rf.h.

I bought st25r3916-disco but i am only using the daughterboard, i detached the daughterboard (the green one), and i am using the i2c communication (i made the modifications states in the reference manual to enable i2c) with a nrf microcontroller.

I am powering the daughterboard with 3,3 volts, connecting positive to pin 8 of the J101 connector of the daughterboard (3V3) and ground to pin 7 (GND)

For current measuring, i am using a current ranger (https://lowpowerlab.com/guide/currentranger/) in series with the positive pin mentioned above, it performs an average measurement.

For communication, i am using DCL and SDA pins on cn100 connector on the daughterboard.

It seems that the i2c communications can get clunky when performing function st25r3916AdjustRegulators in st25r3916.c, at line 250 when executing st25r3916ExecuteCommandAndGetResult, i include a log of the i2c communication.

Thanks,

Regards

MPeli.1
Associate III

Hello,

what are the parasite components that i can eliminate to obtain the least power consumption? i eliminated the r101 resistor that is in series with the LED101, that was draining about 900uA.

Thank you very much,

Regards

Travis Palmer
ST Employee

Hello,

Is the power consumption after removing the LED101 (3.3V Power OK LED) in line with your expectations?

The Supply current in Power-down mode should be between 0.8 and 2.5µA (static at 25°C and 3.3V Supply)

The Supply current in Wake-up mode should be between 3.0 and 6.3µA (static at 25°C and 3.3V Supply)

The Supply current all active should be between 16 and 23mA (static at 25°C and 3.3V Supply)

The power consumption in wake-up mode can then be calculated as in the AN5320.

Besides the power ok LEDs, there are no other components which can be removed to save power.

"It seems that the i2c communications can get clunky ...."

What is your pull up resistor configuration on the DCL and SDA lines at your MCU? The ST25R3916-Discovery board already has some pull up resistors (R201 and R202) populated.

It could also be, that the current ranger causes a voltage drop on pin 8 of j101 when executing the AdjustRegulator command. Please check i2c communication without the current ranger.

Br Travis

MPeli.1
Associate III

Hi, i shorted j202 and j203 and removed r201 and r202, i am using mcu internal pullups for communication.

I also have enabled wto bit for cyclic interrupt every 100ms over intr/irq pin on cn100 connector, but i am not getting any interrupt. What can i check to make sure the configuration for cyclic interrupt is correct?

Thank you very much,

Regards

Grégoire Poulain
ST Employee

Hi,

Looking into the I2C trace provided before it seems that the external IRQ handling on your setup is not properly set.

DateTime: 2020-02-21T11:11:14.583
Start, hA0 [ h50 | WR ], hC1, Stop
Start, hA0 [ h50 | WR ], h7F, 
Restart, hA1 [ h50 | RD ], h2A NAK, 
Restart, hA0 [ h50 | WR ], hFC, h44, 
Restart, hA1 [ h50 | RD ], h00 NAK, Stop
Start, hA0 [ h50 | WR ], hFC, h04, h10, Stop
Start, hA0 [ h50 | WR ], h42, 
Restart, hA1 [ h50 | RD ], h00 NAK, 
Restart, hA0 [ h50 | WR ], h42, 
Restart, hA1 [ h50 | RD ], h00 NAK, Stop
Start, hA0 [ h50 | WR ], h02, h80, Stop
/* ==> IRQ Status Registers should have been read here triggered by IRQ pin (register h1A) */
Start, hA0 [ h50 | WR ], h16, h80, Stop

Please ensure that the ISR and external Interrupt source is functional on your platform.

If the ISR is not serviced (interrupt status Registers read) the IRQ pin will remain high at startup and you will not be able to see any transition when setting the Wake-up mode.

Best regards

GP

MPeli.1
Associate III

Hello, seems that interrupts were not set correctly on my platform, now it is correct.

Now, during execution of rfalWakeUpModeStart(NULL), after rfalInitialize() completes with no errors , mcu enters branch

1)

if( st25r3916CheckReg( ST25R3916_REG_IO_CONF2, ST25R3916_REG_IO_CONF2_aat_en, ST25R3916_REG_IO_CONF2_aat_en ) )
 {
            gRFAL.wum.cfg.swTagDetect     = true;
            gRFAL.wum.cfg.indAmp.autoAvg  = true;
            gRFAL.wum.cfg.indAmp.aaWeight = RFAL_WUM_AA_WEIGHT_16;
 }

Because bit aat_en is set in register ST25R3916_REG_IO_CONF2. I don't want to use swtag detect, i just want the st25r3916 to wake up my cpu as soon as it detects a tag nearby. So, i put a "dummy" fix above these lines, this is the code:

2)

rfalChipChangeRegBits(ST25R3916_REG_IO_CONF2, ST25R3916_REG_IO_CONF2_aat_en, 0);
 
    if( config == NULL )
    {
        gRFAL.wum.cfg.period           = RFAL_WUM_PERIOD_200MS;
        gRFAL.wum.cfg.irqTout          = false;
        gRFAL.wum.cfg.indAmp.enabled   = true;
        gRFAL.wum.cfg.indPha.enabled   = false;
        gRFAL.wum.cfg.cap.enabled      = false;
        gRFAL.wum.cfg.indAmp.delta     = 2U;
        gRFAL.wum.cfg.indAmp.reference = RFAL_WUM_REFERENCE_AUTO;
        gRFAL.wum.cfg.indAmp.autoAvg   = false;
        
 
 
        /*******************************************************************************/
        /* Check if AAT is enabled and if so make use of the SW Tag Detection          */
        if( st25r3916CheckReg( ST25R3916_REG_IO_CONF2, ST25R3916_REG_IO_CONF2_aat_en, ST25R3916_REG_IO_CONF2_aat_en ) )
        {
            gRFAL.wum.cfg.swTagDetect     = true;
            gRFAL.wum.cfg.indAmp.autoAvg  = true;
            gRFAL.wum.cfg.indAmp.aaWeight = RFAL_WUM_AA_WEIGHT_16;
        }
    }
    else
    {
        gRFAL.wum.cfg = *config;
    }

Instruction in line 1 of the code snipped attached resets the aat_en bit, and the cpu does not enter in branch 1). I correctly detect, after the completion of the startwakeup function, that an interrupt is raised if i get the tag included with the discovery board (i am using the big one, that is an ISO 15693 tag). So, is it correct to reset the aat_en bit "manually" in this case?

Thank you very much,

Regards