Can PN7160 detect removal of tag ?

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

Can PN7160 detect removal of tag ?

416 Views
Strooom
Contributor I

I am experimenting with the PN7160 (after using PN7150 for years) and have the following question : after having discovered a NFC Tag (and thus in state RFST_POLL_ACTIVE), will the PN7160 notify me somehow of the Tag being removed ?

I would like to have a simple state machine telling me when a tag was found  (RF_INTF_ACTIVATED_NTF) and also when it was removed..

If I deactivate from the DH, and the restart discovery, I will detect the same tag again if it is still present. This is how I did it with the PN7150 driver, but now I'd like to do a cleaner driver design.

In my tests, I am not getting any notification when a tag is removed, but maybe there are some settings needed in the PN7160 to activate this..

Engineer by Day, Maker by Night
Labels (1)
Tags (1)
0 Kudos
Reply
3 Replies

371 Views
Strooom
Contributor I

Hello Eduardo, thanks for helping me.

Yes I know the NCI stateMachine from Chapter 12 very well, as I have implemented this already for my PN7150 driver.

This stateMachine shows transistions out of POLL_ACTIVE into IDLE or DISCOVERY, with several _NTF notifications, but those notifiications are not sent by the PN7150/PN7160 when the tag is removed from the reader... So I have no way of knowing if the tag is removed.

There is a proprietary RF_PRES_CHECK message, which allows to ask the PN7160 is the tag is still there, but this only works for ISO-DEP or NFC-DEP (See manual chapter 9.3.3), and I need a solution for all tags..

I could reverse engineer the example project to see how it is done there.. but this will take a lot of time and I decided to ask it here first.

This is how I currently solved this:

  1. after detecting a tag by going into POLL_ACTIVE, deactivate the PN7160 polling, and wait a short time (eg 250 ms).
  2. then go back to discovery
  3. if the same tag is detected, the tag is still present
  4. if after some timeout no tag is detected, the tag is removed.

It's not that difficult, but I'd prefer to get an NCI message when the tag is removed, I don't understand why the NFC Forum did not put this in the standard, it's a no-brainer that this would be needed in almost all implementations.

Then 

  with to DISCOVERY with a message 

Engineer by Day, Maker by Night
0 Kudos
Reply

334 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

Perhaps I could recommend you referring to NxpNci_PresenceCheck(NxpNci_RfIntf_t) API from the NXP-NCI examples (project > NfcLibrary > NxpNci20 > src > NxpNxi20.c) for the implementation used in our examples.

Regards,
Eduardo.

0 Kudos
Reply

397 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @Strooom,

Hope you are doing well.

Could you please take a look at the PN7160 NFC controller User Manual, Chapter 12? This chapter contains the overall RF Discovery concepts applied in PN7160 and defined the general RF state machine.

If you are using the PN7160 NXP-NCI MCUXpresso Example Project, you will see that "RW" project waits for card removal by implementing NxpNci_ProcessReaderMode(RfInterface, PRESENCE_CHECK) API.

Regards,
Eduardo.

0 Kudos
Reply