Skip to main content
MatthieuB
Associate
October 19, 2018
Solved

ST25R3911B + STM32L072 in Standby mode (Very low power)

  • October 19, 2018
  • 25 replies
  • 3644 views

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

    This topic has been closed for replies.
    Best answer by MatthieuB

    Hi Ulysses,

    now it seems to be clean, I can wake-up the STM32 with ST25R3911B, read a badge and put the ST25R3911B in Wake-up mode again.

    For that I have to :

    • read ISR (st25r3911Isr())
    • Clear ISR (st25r3911ClearInterrupts())
    • Reset ST25R3911_REG_OP_CONTROL to 0
    • Power Down the ST25R3911B (I have created a function for that)
    • Initialize RFal (rfalAnalogConfigInitialize())
    • Initialize the ST25R3911B st25r3911Initialize()
    • Put the ST25R3911B in Wake-up mode (rfalWakeUpModeStart)

    So now the ST25R3911B can detect again badges and generate IRQ on dedicated pin.

    But how to read again badges using your ST functions when an IRQ is catched ?

    Regards,

    Matthieu

    PS : I just have an oscilloscope at office, it will be great to have a logic analyzer...

    25 replies

    MatthieuB
    MatthieuBAuthor
    Associate
    November 28, 2018

    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
    November 28, 2018

    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
    November 28, 2018

    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
    MatthieuBAuthor
    Associate
    November 30, 2018

    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
    November 30, 2018

    Hi Matthieu,

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

    Best regards

    GP