This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF52 NFC T2T lib setting/getting tag UID

Hello, I'm trying to use NFC module on nrf52382 chip (DK PCA10040) and prepared firmware "nfc_text_record_pca10040" from examples of SDK v13. After flashing the Mifare ultralight card is recognized by reader with some UID. The question is how to set/get the UID of this emulated card. I found the

hal_nfc_parameter_set and 
hal_nfc_parameter_get

methods the parameter could be set by ID but I did not found any ID list in the project. Are these methods intended to work with card UID field?

Thanks

  • FormerMember
    0 FormerMember

    The API function call nfc_t2t_internal_set(..) should be used to set the UID.

    Before calling nfc_t2t_internal(..), nfc_t2t_setup(..) should be called. In addition, the register NFCT ->NFCID1 should be set to the same value as the UID.

    The order of the function calls will be the following:

    1. nfc_t2t_setup(..)
    2. nfc_t2t_internal(..)
    3. Set the UID in the NFCT -> NFCID1 to the UID.
  • Thank you, I modified an example by changing nfc_tag_header0 and nfc_tag_header1 values in hal_nfc_common_hw_setup. Initial UID is taken from NRF_FICR->NFC.TAGHEADER0 and NRF_FICR->NFC.TAGHEADER1 registers.

Related