Environment
-
SoC / Target: nRF54L15 (nrf54l15dk/nrf54l15/cpuapp)
-
NCS Version: v3.4.0
-
Library Configuration: CONFIG_NFC_T4T_NRFXLIB=y, CONFIG_NFC_T4T_ISODEP=y (Raw ISO-DEP mode)
-
Thread Model: CONFIG_NFC_THREAD_CALLBACK=y, CONFIG_NFC_OWN_THREAD=y
-
Poller / Reader: Tested with Android smartphones
Description
I am implementing a custom NFC Type 4 Tag application running in raw ISO-DEP mode on the nRF54L15. The tag is configured using nfc_t4t_setup() (without setting an NDEF payload) and started via nfc_t4t_emulation_start().
The application enables the dedicated NFC platform thread (CONFIG_NFC_OWN_THREAD=y) to deliver events. The registered callback validates the incoming frame length and posts valid APDU payloads to a separate processing worker thread using a message queue.
The Problem
During testing with an NFC reader (for example, during fast polling, transaction bursts, or when the reader pulls away), the callback receives an invalid length condition where (data_length == 0).
Once this condition occurs, the NFC peripheral completely ceases to work:
-
With Error Response: If the callback attempts to send an error response status word (via
nfc_t4t_response_pdu_send()), the tag locks up and stops responding to any further communication. -
Without Error Response: If sending an error response is omitted and the callback simply returns when
data_length == 0, the tag still becomes unresponsive. -
Peripheral Stall: Once stalled, subsequent taps from the phone are ignored. The peripheral stops generating
NFC_T4T_EVENT_FIELD_ON(onlyNFC_T4T_EVENT_FIELD_OFFis observed, or no events at all), and the tag remains dead until a full SoC reboot.
Configuration Highlights
-
CONFIG_NFC_T4T_ISODEP=y -
CONFIG_NFC_T4T_NRFXLIB=y -
CONFIG_NFC_T4T_APDU=y -
CONFIG_NFC_THREAD_CALLBACK=y -
CONFIG_NFC_OWN_THREAD=y -
CONFIG_NFC_RING_SIZE=256 -
CONFIG_NFC_LIB_CTX_MAX_SIZE=64
Questions
-
In raw ISO-DEP mode, what is the expected handling if
NFC_T4T_EVENT_DATA_INDdelivers a frame withdata_length == 0? Must the application still callnfc_t4t_response_pdu_send(), or does a zero length indicate ring buffer or framing corruption? -
Can
CONFIG_NFC_LIB_CTX_MAX_SIZE=64cause incoming APDUs larger than 64 bytes to corrupt or truncate within the NFC platform ring buffer, leading to invalid or zero-length indications? -
On nRF54L15 in NCS v3.4.0, is this stall related to known NFCT field-tear and re-arming issues where the peripheral fails to generate
FIELD_ONafter an incomplete transaction? -
What is the recommended recovery or reset sequence to safely handle an invalid APDU or mid-transaction abort without requiring a full SoC cold reboot?