How to generate an interrupt to the processor when a tag is detected by PN532?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to generate an interrupt to the processor when a tag is detected by PN532?

3,130 Views
praveenkashyap
Contributor II

I want to keep the host processor sleeping till the time a NFC Tag is detected. How can I generate an interrupt to the host processor when NFC tag is detected.

4 Replies

2,127 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Praveen Kashyap:

The pin P70_IRQ could be used for this purpose. But you need to first send the command InListPassiveTarget from the Host so the PN532 turns the RF Field ON and starts scanning for tags. The first low pulse on the P70_IRQ pin should be polled since it corresponds to the ACK frame, then the Host can wait for the next pulse, which will correspond to the actual RESPONSE frame whenever a tag is detected in the field.

I hope this helps.


Best Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

2,127 Views
praveenkashyap
Contributor II

Thanks Jorge, however this does not help me much. Here is my use case:

I have a battery operated device that uses PN532 as NFC reader for login purpose. This device needs to be on 24 * 7 so I am trying to conserve as much power as I can.

Users are given NFC tags and they can login at any time. I am using the PN532 to wake up the host processor. The host processor runs for a few minutes to process what the user needs and then the user logs out (by touching their NFC tag to the NFC reader).

After the user logs out, the host processor goes to sleep but the NFC reader needs waits for the next NFC tag to login.

Is there anyway I can operate the antenna with a 10% (or something similar) duty cycle? My use case allows for the user to wait for a second or so to login to the NFC reader

Can you please suggest the options that I have. Please point me to any documentation that might be helpful.

Regards

Praveen

0 Kudos

2,127 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hi Praveen:

In the way I mentioned you can actually put the host processor to sleep while the PN532 is scanning for tags. If the processor can be waken up via a pin, then the IRQ from PN532 can do the job when activating a tag.

Of course in above approach the RF Field is ON all the time consuming power, so as alternative you could put the processor to sleep and wake it up at periodic intervals to turn the RF Field ON and scan for tags. The number of retries to activate a tag in passive mode can be controlled using the RFConfiguration command for CfgItem_5 -> MxRtyPassiveActivation. More information about this in the user manual:

http://www.nxp.com/documents/user_manual/141520.pdf

Later devices such as the PN7120 / PN7150 have a Low Power Card Detector (LPCD) mode to reduce power consumption while keeping awareness of any tag in proximity to the antenna.

Regards!
Jorge Gonzalez

0 Kudos

2,127 Views
praveenkashyap
Contributor II

Thanks a lot Jorge, we will explore this chip to see if it meets our

objectives.

Praveen

On Sun, Jul 17, 2016 at 7:33 PM, Jorge_Gonzalez <

0 Kudos