cancel
Showing results for 
Search instead for 
Did you mean: 

X-NUCLEO-NFC03A1 Card emulation and sleep?

suads
Associate III

Hi,

I have a custom board with ST25R95 chip, and I have successfully implemented the card emulation on the custom board without going to sleep(discParam.wakeupEnabled = false).

It draws a lot of current, and I need it in sleep mode, but If I set it to true it want work I'm not able to read it with my phone.

So I wanted to test it on the X-NUCLEO-NFC03A1 evaluation board I used the demo_ce.c code to test the sleep functionality. But it doesn't work here at all no matter discParam.wakeupEnabled = false or true. If I put the phone to read the board I'm getting on the debug:

<<<<8f00 from the datasheet it says :

"0x8F00: No field. Command cannot be executed because there is no external field."

And I printed the error code it is 0x37:

ERR_LINK_LOSS ((ReturnCode)37U) /*!< Other device's field didn't behave as expected: turned off by Initiator in Passive mode, or AP2P did not turn on field */

Any Help?

Thanks

Regards suads

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi Suads,

Card Emulation is sensitive to real time processing due to response time constraints (i.e. Frame Waiting Time on reader side may elapse if you have traces in Card Emulation that delay the response to reader request). Therefore make sure not to add traces in the CE processing.

The card Emulation on X-NUCLEO-NFC03A1 should work (assuming all the recommended modifications have been done, see step #4 to #9 in my previous private message).

Regarding your initial question, the wakeup feature is designed to detect a tag in low power mode by sending a burst and measuring the antenna current and comparing to a reference value. Therefore this is not designed to be used when in card emulation.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
Brian TIDAL
ST Employee

Hi Suads,

Card Emulation is sensitive to real time processing due to response time constraints (i.e. Frame Waiting Time on reader side may elapse if you have traces in Card Emulation that delay the response to reader request). Therefore make sure not to add traces in the CE processing.

The card Emulation on X-NUCLEO-NFC03A1 should work (assuming all the recommended modifications have been done, see step #4 to #9 in my previous private message).

Regarding your initial question, the wakeup feature is designed to detect a tag in low power mode by sending a burst and measuring the antenna current and comparing to a reference value. Therefore this is not designed to be used when in card emulation.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Brian TIDAL
ST Employee

Hi Suads,

some additional infos: my previous answer regarding the wakeup feature is related to the way the ST25R95 driver uses the Wait For Event mode (see ST25R95 datasheet §3.1 operating modes). The Wait For Event has different mutually exclusive sub-states including Tag Detector and Field Detector. As Card Emulation mode is not provided in ST25R95 Firmware delivery (but only on demand), the ST25R95 driver enables the Tag Detector sub state when issuing the Idle command.

When running in Card Emulation only, it is possible to enable the Field Detector instead of the Tag Detector: in st25r95_com_spi.c, change the static uint8_t Idle[] to {ST25R95_COMMAND_IDLE, 0x0E, 0x0C, 0x01, 0x02, 0x38, 0x00, 0x18, 0x00, 0x20, 0x60, 0x60, 0x74, 0x84, 0x3F, 0x00};

I've tested on my side and I can see :

Wake Up mode started

Wake Up mode terminated. Polling for devices

when putting a phone close to the antenna.

Let me know if this solves your issue.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
suads
Associate III

Hi Brian

Thanks for your help, currently I m not in need for this. But will try it! But I have another question about st25dv04k and ndef.