Change to NFC library

Hi,

In ncs/v3.1.0/modules/hal/nordic/nrfx/drivers/include/nrfx_nfct.h, the enum 'nrfx_nfct_param_id_t' is defined as:

/** @brief NFCT driver parameter types. */
typedef enum
{
    NRFX_NFCT_PARAM_ID_FDT,     ///< NFC-A Frame Delay Time parameter.
    NRFX_NFCT_PARAM_ID_FDT_MIN, ///< NFC-A Frame Delay Time Min parameter.
    NRFX_NFCT_PARAM_ID_SEL_RES, ///< Value of the 'Protocol' field in the NFC-A SEL_RES frame.
    NRFX_NFCT_PARAM_ID_NFCID1,  ///< NFC-A NFCID1 setting (NFC tag identifier).
} nrfx_nfct_param_id_t;

In the nrfx support libraries shipped to us with a vendor Bluetooth stack, the enum is defined as:

/** @brief NFCT driver parameter types. */
typedef enum
{
    NRFX_NFCT_PARAM_ID_FDT,     ///< NFC-A Frame Delay Time parameter.
    NRFX_NFCT_PARAM_ID_SEL_RES, ///< Value of the 'Protocol' field in the NFC-A SEL_RES frame.
    NRFX_NFCT_PARAM_ID_NFCID1,  ///< NFC-A NFCID1 setting (NFC tag identifier).
} nrfx_nfct_param_id_t;

We are using the NFC libraries (libnfc_t2t.a and libnfc_t4t.a) from SDK v3.1.0 so it appears that v3.1.0 libraries are incompatible with the nrfx support libraries shipped with the Bluetooth stack.

Can you advise in which SDK version the above enum was changed? I'm thinking that I should use the libnfc_t2t.a and libnfc_t4t.a libraries from an SDK version prior to the change.

Kind regards,

Andrew Coad

  • Are there any known issues with libnfc_t2t.a delivered with NCS 2.0.0? I ask because I cannot get NFC working for a pure NCS 2.0.0 build (that is, libnfc_t2t.a and all supporting files). I can get a build using libnfc_t2t.a plus supporting files from NCS 3.1.0 together with nrfx_nfct.c from NCS 2.0.0 working. For both cases, the program flow and the NFC data records are identical so it points to an issue with libnfc_t2t.a.

  • Hi

    There were some issues with the nrfx NFC driver that was fixed in nrfx 4.0.0 (NCS v3.2.0). I attached the patch files here so you can add those on your end. But this was mainly a current consumption issue, so if you have issues with the NFC data itself it might be something else than this issue. What exactly is the issue you're seeing with NFC on your end?


    nrf_nfc_patch.zip

    Best regards,

    Simon

  • What exactly is the issue you're seeing with NFC on your end?

    I'm getting hard fault 50% of the time. If I breakpoint on nrfx_nfct.c::nrfx_nfct_parameter_set(...) and look at the p_param parameter being passed in, it is sometimes good and NFC runs just fine. At other times, the values are garbage and I get an immediate hard fault. The first attached image (fdt=4096) is an example where NFC runs fine. The second is an example where I get a hard fault. These two images were from back-to-back runs.

  • Hi

    And this is on NCS v2.0.0, correct? Is it also reproducible on an nRF development kit so we can reproduce this on our end with one of the sample projects? Does it seem to be happening at random, or is it seemingly random whether you get a hardfault or not?

    Best regards,

    Simon

Related