Showing results for 
Search instead for 
Did you mean: 

ST25R3916 deactivated by itself after a minute or two

Associate II


I incorporated the demo_polling.c example from the RFAL library (STM32CubeExpansion_NFC6_V1.1.0) into my custom application.

My work uses NFC-V tags and by calling demoCycle() function, the application is able to detect the tag repeatedly. 

This is the state machine of my app:

1) Sensor from custom board detects the presence of an object inserted (contains NFC-V tag).

2) App calls demoCycle() repeatedly for a period of 5 seconds, and also services the interrupt from ST25R3916.

3) App successfully detects the NFC-V tag (ID and read data block) over and over again.

4) App stops calling demoCycle() after 5 seconds.

However, I notice if there is no tag activity for about 1 to 2 minutes, the application will stop detecting the tags forever. At this point, when I place a tag nearby, the state is always at RFAL_NFC_STATE_POLL_TECHDETECT. The only way to fix the tag detection is to power cycle the whole board.

It appears the ST25R3916 chip is stuck in some mode (maybe sleep or undefined mode). I am not using LISTEN MODE or WAKEUP mode.

Does the demoCycle() function need to run forever? I also notice each time demoCycle() is called, it generates an interrupt to the app (regardless if a tag is nearby or not).

Please advice, thank you.


Accepted Solutions
Associate II

Thank you Ulysses. Turns out to be a timer bug with my code.

View solution in original post

ST Employee

Hi JLee.47,

depending on MCU timer expiration demoCycle() will move to polling and thus enable the field. The direct command for doing this will generate interrupts (signaling success or fail). I think you should analyze the code or SPI traffic what happens in this case.

Maybe you stayed with field-on for 1-2 minutes and your design has a heat issue? But this is currently only a wild guess. Better to do this based on debugging/SPI traffic.

Best Regards, Ulysses

Associate II

Thank you Ulysses. Turns out to be a timer bug with my code.