2018-10-19 02:14 AM
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
Solved! Go to Solution.
2018-11-23 05:39 AM
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:
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
2018-11-28 01:11 AM
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
2018-11-28 02:08 AM
Hi Matthieu,
It's hard to understand the sequence executed especially without any traces.
Please find our remarks/questions:
Kind regards
GP
2018-11-28 02:15 AM
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
2018-11-30 03:04 AM
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
2018-11-30 03:35 AM
Hi Matthieu,
Sure, you can send a private message by going to User -> My Messages -> New.
Best regards
GP