Skip to main content
Visitor II
May 29, 2024
Solved

Is there any example file of Card Emulation Mode?

  • May 29, 2024
  • 1 reply
  • 1770 views

Hello

I have a custom board with the st25r3920B. I want to operate this board in CE mode.

So I set RFAL_FEATURE_LISTEN_MODE to true. 

But there is a difficulty because there is no sequence or example code for how to operate in CE mode.

Where should NDEF data be set and how do I set AID?

Is there any working example, or documentation to implement card emulation?

 

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    Hi,

    X-CUBE-NFC6 provides a polling example that supports T3T and T4T CE mode and emulates a tag having an NDEF message. The STSW-ST25R016 (ST25 embedded NFC library) also provides a dedicated CE example (its emulate a pairing record).

    See demoCE function inside demo_polling.c. In this demo, you can also set the DEMO_CARD_EMULATION_ONLY flag to have only CE mode and disable reader activities (otherwise the device will alternate between reader mode and card emulation mode during polling)

    Rgds

    BT

    1 reply

    Technical Moderator
    May 29, 2024

    Hi,

    X-CUBE-NFC6 provides a polling example that supports T3T and T4T CE mode and emulates a tag having an NDEF message. The STSW-ST25R016 (ST25 embedded NFC library) also provides a dedicated CE example (its emulate a pairing record).

    See demoCE function inside demo_polling.c. In this demo, you can also set the DEMO_CARD_EMULATION_ONLY flag to have only CE mode and disable reader activities (otherwise the device will alternate between reader mode and card emulation mode during polling)

    Rgds

    BT

    BAkeryyAuthor
    Visitor II
    June 18, 2024

    Hi, 

    Thanks to your support. I checked the example code and NDEF stack library well.

    I have one more question, do I need RF matching even when running in CE mode?

     

    When the device operating as a reader in the NFC reads data from the tag(CE mode tag),

    I think there was nothing to control on the tag side, because the device supplies power to the tag.

    But I think the sensitivity is not good when operation in CE mode.

    The reader device responds very occasionally.. Is this not my problem, but the reader's problem?

    How do I get my CE mode to react well with the reader device?

    Technical Moderator
    June 18, 2024

    Hi eagles64,

    the existing demos we are providing (X-NUCLEO-NFC06/8) should show good performance in Reader and tag mode. 

    Even for tag mode you need to match to adapt the resonance frequency. For a pure tag application one could imagine moving to completely different matching topologies (removing EMC filter, maybe disconnecting RFO pins and solely modulate using EXT_LM, ...) but we cannot give you guidance on these topics. Your easiest way forward is to stick with matchings as described in AN5276.

    Best Regards, Ulysses