AnsweredAssumed Answered

pn7150 read/write to 2 tags at the same time

Question asked by ziv hershkovitch on Jun 22, 2020
Latest reply on Jul 2, 2020 by Jeremy Geslin

hello nxp 

 

i am working with pn7150

my host mcu connect with the pn7150 via i2c

the pn7150 will try to be reading and writing to 2 nearby ntag213 type 2 tags

 

  1. i wonder in a SW / API manner how to prevent collisions when reading or writing to one tag or the other

 

i found this functions in the nfc.h file 

bool NxpNci_ReaderActivateNext(NxpNci_RfIntf_t *pRfIntf);

bool NxpNci_ReaderReActivate(NxpNci_RfIntf_t *pRfIntf);

but it is not clear how i know to which card i am talking to, which one is activated and which one is deactivated?

Is there a tag instance for each one of them ???

 

does the variable ' NxpNci_RfIntf_t RfIntf '  contain the tag's id or specification so if I give it as an argument to a function it works on a certain tag and not the other one? If so, where is it defined and do I need to hold 2 instances of that variable?

 

also in the

            bool NxpNci_StartDiscovery(unsigned char *pTechTab, unsigned char TechTabSize);

what is the functionality of the pointer pTechTab .. is it some sort of ids to the tags ? if so, how can I use this ids to determine to which tag I am writing/reading ?

 

2. Do I need to use the

bool NxpNci_StartDiscovery(unsigned char *pTechTab, unsigned char TechTabSize);

            every time befor using

            bool NxpNci_ReaderTagCmd (unsigned char *pCommand, unsigned char CommandSize, unsigned char *pAnswer, unsigned char *pAnswerSize);

or is it ok if I use it once in the beginning of the program  ?

 

 

3. What is the difference between using :

void NxpNci_ProcessReaderMode(NxpNci_RfIntf_t RfIntf, NxpNci_RW_Operation_t Operation);

            or using :

bool NxpNci_ReaderTagCmd (unsigned char *pCommand, unsigned char CommandSize, unsigned char *pAnswer, unsigned char *pAnswerSize);

            I understand the first one calls for a callback function but actually they both wait for tags response so ??

 

 

basically if there are some code examples somewhere for sending and receiving data for more than one tag, because it is very difficult to start with the basic from nxp_nci_mcuexpresso

which just read if a tag is present or not if i get it right

 

i need to be sending a reading request for specific data and i need to write to specific data to specific location, so i guess there is always a read cmd and then wait for reply.. ?

again i need SW help

 

best regards

Ziv

Outcomes