[PN7462AU] NFC polling without RF reset

cancel
Showing results for 
Search instead for 
Did you mean: 

[PN7462AU] NFC polling without RF reset

Jump to solution
258 Views
Contributor I

Good day,

I'm a engineer using PN7462AU.  I am developing an NFC communication program. When I remove the card (tag), I want to recognize it and stop all communication.

Below is the setup details,

1. Hardware: PN7462AU
2. SDK: PN7462AU-FW_v05.21.00
3. IDE: MCUXpresso IDE v11.0.0

 

Now I develop my program based on NfcrdlibEx7_EMVCo_Polling. 

See NfcrdlibEx7_EMVCo_Polling.c 239 Line.

do
{
    if((status & PH_ERR_MASK) != PHAC_DISCLOOP_NO_TECH_DETECTED)
    {
        /* Perform RF Reset */
        status = EmvcoRfReset();
        CHECK_STATUS(status);
    }

    /* Set discovery loop poll state */
    status = phacDiscLoop_SetConfig(pDataParams, PHAC_DISCLOOP_CONFIG_NEXT_POLL_STATE, PHAC_DISCLOOP_POLL_STATE_DETECTION);
    CHECK_STATUS(status);

    /* Start Polling, Function will return once card is activated or any other error has occurred */
    status = phacDiscLoop_Run(pDataParams, PHAC_DISCLOOP_ENTRY_POINT_POLL);

} while((status & PH_ERR_MASK) != PHAC_DISCLOOP_DEVICE_ACTIVATED); /* Exit on Card detection */

If RF Reset is not done in the above code, the next phacDiscLoop_Run() API does not always recognize the NFC Tag.

Question 1) Can phacDiscLoop_Run() API recognize NFC Tag without RF reset?

Question 2) Is there any other API that determines whether NFC Tag is in contact?

 

If anyone knows the answer to your question, please reply.

If you have any question, please feel free to contact me.

 

Thanks.

Labels (1)
0 Kudos
1 Solution
118 Views
NXP TechSupport
NXP TechSupport

Hello,

A1. It would be helpful to please refer to the basic discovery loop example to see the discovery loop flow.

A2. Please refer to the following thread where this was already addressed: https://community.nxp.com/message/1303229 

Have a nice day!

BR,

Ivan.

View solution in original post

0 Kudos
5 Replies
118 Views
Contributor I

Dear Ivan

Thank you for response my question.

Q2 is same as my previous question.[PN7462AU] Is there an API to immediately check if a card(tag) has been removed? 

But I just wanted to know another API to check NFC card(tag) present.

Through Q1, I wanted to know if RF Reset must be performed before executing the phacDiscLoop_Run() API. All of the examples that use the phacDiscLoop_Run() API in the SDK always do an RF reset first. I know it is absolutely necessary.

Thanks to Ivan, I solve this problem once again. Thank you very much.

0 Kudos
119 Views
NXP TechSupport
NXP TechSupport

Hello,

A1. It would be helpful to please refer to the basic discovery loop example to see the discovery loop flow.

A2. Please refer to the following thread where this was already addressed: https://community.nxp.com/message/1303229 

Have a nice day!

BR,

Ivan.

View solution in original post

0 Kudos
118 Views
Contributor I

Dear Ivan

Hi, I have one more question about NFC card(tag) presence.

I checked NFC card(tag) presence using phpalI14443p3a_WakeUpA(), phpalI14443p3a_HaltA() APIs.

But after using phpalI14443p3a_WakeUpA() API, phpalI14443p4_Exchange() API always fails. 

My intention is to find the NFC card(tag) with phacDiscLoop_Run() API, then execute the loop directly below.

The loop is to determine the presence or absence of a NFC card(tag), if there is a tag, nfc communication is performed, and if there is no tag, the loop is exited.

The problem here is that the presence or absence of the tag is determined, and if there is a tag, nfc communication cannot be performed. (because of phpalI14443p3a_WakeUpA())

Question) After executing phpalI14443p3a_WakeUpA(), is there any way to successfully execute phpalI14443p4_Exchange()?

 

If anyone knows the answer to your question, please reply.

If you have any question, please feel free to contact me.

0 Kudos
118 Views
NXP TechSupport
NXP TechSupport

Hello,

Thanks for contacting us again.

The recommendation is to let the Discovery loop (already implemented in basic discovery loop example) detect and manage the anti-collision part, after that process, now please start to exchange data with the Tag. The card detection mentioned before, it is better to implement it at the end of this process to know in the Tag is still on the field.

Have a nice day!

BR,

Ivan.

0 Kudos
118 Views
Contributor I

Good day, 

Thank you for helping me. Your answer was very helpful, but the whole communication didn't work, so I asked again.

My approximate program flow is as follows.

Polling Task

{

    while(1) // Task while() // while_no1

    {

        DiscLoop_Setting(); // setting including avoidance collision

        do // while_no2

        {

            RF_Reset();

            DiscLoop_Run();

        } while(DISCLOOP_DEVICE_ACTIVATED);

        ... // checking tag info

        while(1) // Loop for data communication with NFC tag multiple times // while_no3

        {

            NFC_dataExchange();

            phpalI14443p3a_WakeUpA();

            if(true) // NFC card(tag) detected

            {

                print("CARD ON");

            }

            else // NFC card(tag) undetected

            {

                print("CARD OFF");

                break;

            }

            phpalI14443p3a_HaltA();

        }

    }

}

The purpose of my program is to enter into while_no3 and communicate NFC with a single tag several times. When the program is in while_no3, the moment NFC tag drops, it goes out of while_no3.

As a result of executing the above program, there are some problems.

1. In while_no3, NFC_exchange () always fails when executing the phpalI14443p3a_WakeUpA () API. (The same is true even if you set collision prevention.)

2. After running the program, phpalI14443p3a_WakeUpA () always fails when it is first tagged. However, if tagging again, the presence or absence of the tag is normally determined.

Additional Question) I know that the phpalI14443p4_PresCheck() API is to checks the existence of an NFC card. Is it right? A hard fault occurs the moment you use the prescheck API. Is there any special way to use this API?

Sorry for the complicated question. If there is a way to solve it, please reply.

If you have any question, please feel free to contact me.

Thanks.

0 Kudos