cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3911B + STM32L072 in Standby mode (Very low power)

MatthieuB
Associate III

Hi,

I'm working with a ST25R3911B RFID chip associated to a STM32L072 uC.

I use the "STM32CubeExpansion_NFC5_V1.2.0" project, ported from STM32F401 to STM32L072.

This project enables to set the ST25R3911B  in wake-up low power mode.

Now I'm trying to set the STM32L072 in standby mode with the ST25R3911B  using the IRQ.

I can wake-up the STM32 with IRQ generated by ST25R3911B  when a badge is passed but I cannot read the badge.

So my question is : is the "STM32CubeExpansion_NFC5_V1.2.0" project compliant with uC low power mode like standby ?

Regards,

Matthieu

25 REPLIES 25
MatthieuB
Associate III

Hi Gregoire,

Ok so during wake-up from STANDBY mode if I call rfalWakeUpModeHasWoke() after checking PWR_FLAG_WU (for wakeping the STM32) it respond me 0.

Anyway it works I can read a RFID badge and the STM32 is correctly initialized.

Then after having read a badge I just reset the ST25R3911_REG_OP_CONTROL.

After a few time I call rfalWakeUpModeStart(NULL) in order to enable again the wake-up mode.

And I call a function HW_GPIO_SetIrq(IRQ_3911_GPIO_PORT, IRQ_3911_PIN,10,RFID) which call the function RFID when and IRQ on IRQ_3911_GPIO_PIN arrives. I will add a STOP or OFF mode here.

Inside the RFID function I do:

  • woke=rfalWakeUpModeHasWoke() => respond 0
  • rfalWakeUpModeStop();
  • rfalInitialize();
  • rfalWorker();
  • demoCycle();

But this doesnt work, I have an error 3 returned by rfalNfcaPollerTechnologyDetection(RFAL_COMPLIANCE_MODE_NFC, &sensRes);

The rfalworker seems to work bad at this time, you said it does not automatically get out of wake up mode into transceive mode, but how to do this ?

Thank you for your precious help.

Best Regards,

Matthieu

MatthieuB
Associate III

Hi Grégoire,

it seems that the rfalWakeUpModeHasWoke() always respond me 0.

I guess it means the RFAL_WUM_STATE_NOT_INIT.

I don't know how to correctly set the rfal states ?

Is a documentation available for the rfal driver ?

Best Regards,

Matthieu

Grégoire Poulain
ST Employee

Hi Matthieu,

It's hard to understand the sequence executed especially without any traces.

Please find our remarks/questions:

  • You mention that rfalWakeUpModeHasWoke() returns false, therefore there was no IRQ indicating that the surroundings have changed. Why then do the WakeUp mode is terminated?
  • Accessing/modifying the ST25R3911B registers directly can render the RFAL/ST25R3911B in an inconsistent state. In the past as you were using a deeper MCU Sleep and this was necessary. Since you are using a WFI is this still necessary?
  • It is also not clear why you need to re configure the ST25R3911B IRQs all the time. Shouldn't this be done at startup only, or you are using again a deep MCU sleep?
  • ERR_IO (3) is returned when the library observes some unexpected behavior. Usually some IRQ is missing or it fails the expected order. From your description it seems that the IRQ handling is not functioning as expected and the ST25R3911 ISR is not served accordingly.

Kind regards

GP

Grégoire Poulain
ST Employee

Hi Matthieu,

The RFAL states are not to be set by the user. You should use the APIs available in the header files and documented (see rfal.chm).

There are some actions that require to be performed by running through some states: Transceive, Listen Mode, Wake-Up mode.

For these you find the respective APIs xxxStart() and xxxStop().

The rfalWakeUpModeHasWoke() will return false whether there was no change in the surroundings and off course if the Wake-Up mode has not been started yet.

Kind regards

GP

MatthieuB
Associate III

Hi Grégoire,

I think the best way is to share the code with you.

Is it possible to do this in a private mode ?

Now I have removed the maximum useless functions I have created to direct acces to ST25R3911B registers.

I no longer call the IRQ functions too after UID read.

By the way I can see the IRQ when a badge is detected in wake-up mode with an oscilloscope, so I guess the ST25R3911B is correctly configured ?

For the need of our low power consumption project I HAVE TO enter stop or off mode when the MCU does nothing. So I mean after standby mode at the start I need other low power modes.

Best Regards,

Matthieu

Grégoire Poulain
ST Employee

Hi Matthieu,

Sure, you can send a private message by going to User -> My Messages -> New.

Best regards

GP