2023-05-19 01:05 AM
Hi,
I have a device that should normally be in Standby mode. Eventually it will need to wake up when a NFC tag is read, and then do some stuff (and retain the info of the tag).
At the moment I got the STM32H7 to go to Standby mode, and is waking up thanks to a IRQ of the NFC reader via a wakeup pin (when approaching a tag). I see that when exiting Standby mode the uC reboots, and thanks to HAL_PWREx_GetWakeupFlag(PWR_WAKEUP_FLAG6), I'm aware that I'm waking up due to an interrupt from NFC.
The problem is that, as we are rebooting, NFC gets initialized again and therefore we miss the information of the tag that caused the waking up. Is there any nice way to deal with this? like some function that forces the reading of last tag without needing too much context?
At the moment I can only think of not doing NFC initialization again when coming from Standby. But this means that I need to go inside the fw to push some internal states of the NFC RFAL to be able to do a demoNdef(). This doesn't feel right and I have the feeling it will be a headache.
Any ideas? thanks!
Solved! Go to Solution.
2023-05-22 01:06 AM
Hi TVare.1,
At the time the wake-up interrupt gets triggered there is no information on the tag itself - the only information is that a de-tuning of the antenna tank has happened (could also be changing environment.
So I would go and after having detected NFC as the event triggering the exit of the standby:
Best Regards, Ulysses
2023-05-22 01:06 AM
Hi TVare.1,
At the time the wake-up interrupt gets triggered there is no information on the tag itself - the only information is that a de-tuning of the antenna tank has happened (could also be changing environment.
So I would go and after having detected NFC as the event triggering the exit of the standby:
Best Regards, Ulysses