AnsweredAssumed Answered

Are there any special conditions for CardEmulation operation?

Question asked by duwon lee on Jul 19, 2020
Latest reply on Jul 31, 2020 by Estephania Martinez

Hello,

Among the examples provided by the PN5180, I am testing the integration of Ex2 AdvancedDiscoveryLoop and Ex8 HCE_T4T.

The documentation I referenced is the link below.
https://community.nxp.com/message/941308

Here is my scenario:
A. It basically works as a card reader.
B. When external RF signal is detected, it operates as card emulation.
C. After a certain period of time, return to the card reader.

The problem comes from B.

First, when the [PHAC_DISCLOOP_EXTERNAL_RFON] flag occurs, switching to card emulation mode works normally.

However, as explained in the example above
If [PHAC_DISCLOOP_ACTIVATED_BY_PEER] occurs in listen mode, card emulation mode does not work properly. (It enters the card emulation routine, but communication is not possible..)

In the case of iPhone, the scan mode is terminated when another RF signal is encountered during NFC scanning, so the PN5180 may not catch the RFON, which is a problem.

There is another situation,
This is the case when using time division rather than external RF signal detection as a mode switching trigger.
Here is the scenario:

A. Card reader works for 1 second
B. Card emulation mode for 1 second
repeat...


For example, after repeating Polling mode 500 times, and repeating card emulation 500 times,
Card emulation does not work properly.

Can you tell me what I am missing?

Thank you.


additional information...
The following is the method I am using when switching modes.

success:
else if((status & PH_ERR_MASK) == PHAC_DISCLOOP_EXTERNAL_RFON)
{
/*
* If external RF is detected during POLL, return back so that the application
* can restart the loop in LISTEN mode
*/
wEntryPoint = PHAC_DISCLOOP_ENTRY_POINT_LISTEN;
//Poll to listen
bMode = 1;

/* Switch off RF field */
statustmp = phhalHw_FieldOff(pHal);
CHECK_STATUS (statustmp);

status = phApp_HALConfigAutoColl();
CHECK_STATUS (status);

DEBUG_PRINTF (" \n PHAC_DISCLOOP_EXTERNAL_RFON... \n");
}

failure:

if((status & PH_ERR_MASK) == PHAC_DISCLOOP_ACTIVATED_BY_PEER)
{
//Poll to listen
//bMode = 1;
//wEntryPoint = PHAC_DISCLOOP_ENTRY_POINT_POLL;

wEntryPoint = PHAC_DISCLOOP_ENTRY_POINT_LISTEN;
//Poll to listen
bMode = 1;

/* Switch off RF field */
statustmp = phhalHw_FieldOff(pHal);
CHECK_STATUS (statustmp);

status = phApp_HALConfigAutoColl();
CHECK_STATUS (status);
DEBUG_PRINTF (" \n Device activated in listen mode... \n");
}

Outcomes