cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3916 with STM32H7 in Standby mode (losing tag information due to reboot)

TVare.1
Associate III

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Ulysses HERNIOSUS
ST Employee

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:

  1. Perform normal re-initialization of NFC
  2. In this case rfalNfcDiscover() with wakeupEnabled=false to cause reading of NFC
  3. If no tags are detected for some time: restart discovery with wakeupEnabled=true.

Best Regards, Ulysses

View solution in original post

1 REPLY 1
Ulysses HERNIOSUS
ST Employee

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:

  1. Perform normal re-initialization of NFC
  2. In this case rfalNfcDiscover() with wakeupEnabled=false to cause reading of NFC
  3. If no tags are detected for some time: restart discovery with wakeupEnabled=true.

Best Regards, Ulysses