NFC知识库

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

NFC Knowledge Base

讨论

排序依据:
     This document mainly describes how to use NanoNVA tool to do antenna tuning on OM29263ADK with CLEV663B/PN5180B board. Please refer to the application note AN12810(https://www.nxp.com/docs/en/application-note/AN12810.pdf) about the NanoVNA tool. And please refer the user manual UM11098 (https://www.nxp.com/docs/en/user-guide/UM11098.pdf) about OM29263ADK. After setting NanoVNA tool with reference to the above documents. Firstly, take the small antenna of OM29263ADK with CLEV663B as an example. The small antenna can be directly connected and used on the CLEV6630B。the antenna board can be directly connected to the CLEV6630B without any additional modification, after the original antenna had been removed (cut off).   The result of the antenna tuning with NanoVNA tool as the below:   Second, take the small antenna of OM29263ADK with PN5180B board as an example. Follow the UM11098 steps as the below: (a) the EMC filter cut off frequency must be adjusted, and (b) the DPC and related features should be disabled, since the antenna is asymmetrically tuned and the DPC is not used. (a) The original antenna uses a symmetrical tuning, which uses an EMC filter with L0 = 470nH and C0 = 253pF (220pF + 33pF). The inductor as well as the first part of the capacitance (220pF) are assembled on the main board. To operate the OM29263ADK antenna, the C0 (220pF) on the PNEV5180B must be replaced by a 68pF.   (b) The DPC and its related features should be disabled to operate an asymmetrical antenna.   If can’t get the card information please refer to the AN11740’s related steps to achieve a good sensitivity of RxP/RxN path. The result of the antenna tuning with NanoVNA tool as the below:   The whole process of the small antennas tuning of OM29263ADK with CLEV66B/PN5180 with NanoVNA is completed. PS: It is the similar with the steps for the large antennas tuning of OM29263ADK with CLEV66B/PN5180 with NanoVNA.  
查看全文
Please kindly refer to the attachment for details.   Hope that helps,
查看全文
The video shows how to read the NDEF message under password protection. For more details , please kindly refer to https://community.nxp.com/docs/DOC-347622 
查看全文
MIFARE DESFire Light read and write demonstration
查看全文
Example sends Wi-Fi credentials from phone to IoT device, so it can join the Wi-Fi network.  Using: iOS and Android phone with NXP's TagWriter app PN7462 NFC Reader device on PNEV7462B eval board, part of kit OM27462CDK Host Card Emulation mode example based on NfcrdlibEx8_HCE_T4T example from NFC Reader Library Example will also print out other NDEF messages received.  NDEF formats include: Contacts / Business Cards URL link Wi-Fi network and credentials Bluetooth MAC address for pairing Email address Phone number Geo location Launch application on host OS Plain text SMS (sorry the audio is horrible)
查看全文
https://community.nxp.com/docs/DOC-340389 
查看全文
The NFC reader library is supporting multiple frontends. For a customer this might become a more difficult to use, if only the part for one of the frontend chips is needed. To enhance the readability and usability, you can remove the support for not used reader ICs by simply removing the folders below NxpRdLib/comps/phhalHw/src. For instance: if you only want to use the RC663, you could simply delete the folders Pn5180, Rc523. The result would be a library that only supports RC663. This short screen recording shows the steps to reduce the number of supported Frontends.
查看全文
Hello NFC and Kinetis enthusiasts, NTAG I2C plus tag ICs offer both, a contact (I2C) and a contactless interface (NFC) to ease the development of IoT, home-automation and consumer applications. The target of this document and the example projects is to show how NTAG I2C plus can act as the bridge from a host NFC device, like a smartphone or PC, to an embedded board such as a Kinetis Freedom board. 2 main functionalities are demonstrated: embedded board control via NFC and firmware upgrades over NFC. Board control with NFC enabled device NTAG I2C plus provides an easy way of sending/receiving any kind of data between a product embedding an MCU to a host NFC device (e.g. smartphone). Some use cases include product configuration, control or data sensing. A major advantage is that we can have a customized application or graphic interface in the smartphone instead of expense of an LCD screen for the embedded board. Bootloader over NFC Firmware updates in the field are a very common practice for products based in an embedded system. The main advantages of a bootloader over NFC are the simplicity and the non intrusive nature, as it communicates using NFC antennas, i.e. without any wires or physical connections. DEMO PROJECT The next picture shows the setup and connections from the NTAG I2C Plus antenna board to the FRDM-K64F. Hardware - Kinetis Freedom board FRDM-K64F - NTAG I2C Plus Antenna board or flex antenna with the NTAG I2C plus IC. Software - Kinetis Software Development Kit (KSDK) v2.0 - Kinetis Design Studio (KDS) v3.2 - NTAG I2C Demo Android application. Available from Google Play. :smileyalert: Note: Please verify that your smartphone supports NFC. Otherwise the Android app can be installed but it cannot be used for interfacing with the NTAG I2C Plus IC. TESTING THE DEMO PROJECTS There are two KDS projects attached to this document: - NTAG_I2C_Plus_FRDMK64_Demo: Demonstrates the transfer of data between the phone and the MCU. - NTAG_I2C_Plus_FRDMK64_Bootloader: Provides a mean to update the firmware in the Kinetis MCU. The application must be prepared to be placed at an offset of 0x4000 in the MCU internal flash. To load any of these demos please open the corresponding project in KDS IDE, build the project and start a debugger session to program the K64. NTAG_I2C_Plus_FRDMK64_Bootloader 1- In FRDM-K64F, SW2 must be pressed during reset to enter bootloader mode. Hence the 2 usual ways are:+    A) If the board is powered, press and hold SW2 and then press Reset button.    B) When the board is not powered, press and hold SW2 and then plug the USB cable. 2- From the Android demo app go to the "Flash" option. Then click on "Select from Storage" to browse for the application binary file. :smileyinfo: Note: For this bootloader example, the application including the vector table must be relocated to an offset of 0x4000 in Flash. 3- Finally tap the phone to the NTAG I2C Plus antenna and hold it steady during the flashing progress. When the app shows "Flash Completed" the new application starts executing. NTAG_I2C_Plus_FRDMK64_Demo :smileyalert: NOTE: By default the demo project has the 0x4000 offset, so please build the project and then load the generated binary using the bootloader as described above. - Bring the NFC enabled phone near the NTAG I2C Antenna. - Verify transfer is already in progress, by checking the "Board Status". - Press the Orange/Blue/Green buttons in the Android app to change the color of the RGB LED. - Enable the checkbox for "Enable Temperature Sensor" to see the reading of the K64 internal temperature. I hope these demo projects are useful. Please feel free to share your comments or ask any questions. Regards! Jorge Gonzalez
查看全文
Hello NFC enthusiasts, The following topics will be covered in this document: Activation of multiple Tags. For more information, please refer to Activating multiple Tags using NFC Reader Library  Read and Write NDEF messages. Reading values from GPIOs. This document will be segmented into three parts: Description. Software configuration section. Hardware configuration section. Demonstration. Description. The purpose of this project is to copy the information stored from one tag to another by making use of GPIOs to decide which tag to copy from. This way, topics such as read and write NDEF, card activation and GPIOs will be implemented.   Software configuration section: This demonstration is based on NXP NFC Reader Library v05.02.00, NfcrdlibEx3_NFCForum project for PNEV7462B, in which some modifications are going to be made in order to carry this out. These tags are compliant with NFC Forum Type 2 Tag and ISO/IEC14443 Type A specifications.    In phacDiscLoop.h modify the max number of cards supported (two cards for this demonstration):   #define PHAC_DISCLOOP_CFG_MAX_CARDS_SUPPORTED 0x02U      In NfcrdlibEx3_NFCForum.c add the following code in LoadDiscoveryConfiguration():   static phStatus_t LoadDiscoveryConfiguration() { ... /*Passive max typea devices*/ status = phacDiscLoop_SetConfig(pDiscLoop, PHAC_DISCLOOP_CONFIG_TYPEA_DEVICE_LIMIT, 2); CHECK_STATUS(status); }   A fix to the SW stack has to be made (Fix will be implemented in the next release): open "phacDiscLoop_Sw_Int_A.c", line 511, change if statement as below.     if((pDataParams->sTypeATargetInfo.bTotalTagsFound > 1) && ((bTypeATagIdx) < pDataParams->sTypeATargetInfo.bTotalTagsFound))   In NfcrdlibEx3_NFCForum.c add #include "phhalGpio.h" to local headers section. /* Local headers */ #include <cards.h> #include "phhalGpio.h" #include "NfcrdlibEx3_NFCForum.h"‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ In NfcrdlibEx3_NFCForum.c define uint16_t NDEFlength = 0 and declare void InitGPIOs(void) in Global Defines section. /******************************************************************************* **   Global Defines *******************************************************************************/ phacDiscLoop_Sw_DataParams_t       * pDiscLoop;       /* Discovery loop component */ void * ppalI18092mPI; void * ppalI18092mT; void * palTop; /* Variables and InitGPIOs() needed for this application */ uint8_t bTagState1; uint8_t* value; uint8_t* value1; uint8_t val,val1; uint16_t NDEFlength = 0;‍‍‍‍‍‍‍‍‍‍‍‍‍‍ void InitGPIOs(void);‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ in Main Function, initialize the following: /******************************************************************************* **   Main Function *******************************************************************************/ int main (void) {      /* Initialize section */      value=&val;      value1=&val1;      InitGPIOs();‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ In case of multiple devices (which is of our interest) add the following code and comment the if(wNumberOfTags > 1){...} section as follows: else if((status & PH_ERR_MASK) == PHAC_DISCLOOP_MULTI_DEVICES_RESOLVED)             {                 /*                  * Multiple cards resolved. It enters here if DEVICE LIMIT > 1 and more than one devices are                  * detected and resolved.                  */                 DEBUG_PRINTF (" \n Multiple cards resolved: \n");                 /* Get detected technology type */                 status = phacDiscLoop_GetConfig(pDiscLoop, PHAC_DISCLOOP_CONFIG_TECH_DETECTED, &wTagsDetected);                 CHECK_STATUS(status);                 /* Get number of tags detected */                 status = phacDiscLoop_GetConfig(pDiscLoop, PHAC_DISCLOOP_CONFIG_NR_TAGS_FOUND, &wNumberOfTags);                 CHECK_STATUS(status);                 DEBUG_PRINTF ("\tNumber of tags: %d \n",wNumberOfTags);                 /* Tag 1 information */                 DEBUG_PRINTF ("\n Tag 1 NDEF information: \n");                 status = phacDiscLoop_ActivateCard(pDataParams, PHAC_DISCLOOP_TECH_TYPE_A, 0x00);                 /* Check for NDEF presence */                 status = phalTop_CheckNdef(palTop, &bTagState1);                 DEBUG_ERROR_PRINT(status);                 status = ReadNdefMessage(PHAL_TOP_TAG_TYPE_T2T_TAG);                 DEBUG_ERROR_PRINT(status);                 /* Tag 2 information */                 DEBUG_PRINTF ("\n Tag 2 NDEF information: \n");                 status = phacDiscLoop_ActivateCard(pDataParams, PHAC_DISCLOOP_TECH_TYPE_A, 0x01);                 /* Check for NDEF presence */                 status = phalTop_CheckNdef(palTop, &bTagState1);                 DEBUG_ERROR_PRINT(status);                 status = ReadNdefMessage(PHAL_TOP_TAG_TYPE_T2T_TAG);                 DEBUG_ERROR_PRINT(status);                 DEBUG_PRINTF (" \n --------------------------------------------------------------------------------------- \n\n");                 DEBUG_PRINTF (" \n Options: \n\n");                 DEBUG_PRINTF (" \n 1.- Left button  -(X)-( )- To copy NDEF message from Tag 1 to Tag 2 \n\n");                 DEBUG_PRINTF (" \n 2.- Right button -( )-(X)- To copy NDEF message from Tag 2 to Tag 1 \n\n");                 DEBUG_PRINTF (" \n --------------------------------------------------------------------------------------- \n\n");                 /* Reading values from GPIOs 2 and 3 */                 do                 {                     phhalPcr_GetGpioVal(2,value);                     phhalPcr_GetGpioVal(3,value1);                 }while(*value==1 && *value1==1);                 /* Copy NDEF content from tag at index 0 to Tag at index 1*/                 if(*value==0 && *value1==1)                 {                      DEBUG_PRINTF (" \n Copy NDEF from Tag 1 to Tag 2 \n");                 status = phacDiscLoop_ActivateCard(pDataParams, PHAC_DISCLOOP_TECH_TYPE_A, 0x00);                 /* Check for NDEF presence */                 status = phalTop_CheckNdef(palTop, &bTagState1);                 DEBUG_ERROR_PRINT(status);                 status = ReadNdefMessage(PHAL_TOP_TAG_TYPE_T2T_TAG);                 DEBUG_ERROR_PRINT(status);                 status = phacDiscLoop_ActivateCard(pDataParams, PHAC_DISCLOOP_TECH_TYPE_A, 0x01);                 /* Check for NDEF presence */                 status = phalTop_CheckNdef(palTop, &bTagState1);                 DEBUG_ERROR_PRINT(status);                     if(bTagState1 == PHAL_TOP_STATE_READWRITE)                     {                     status = WriteNdefMessage(PHAL_TOP_TAG_TYPE_T2T_TAG);                     DEBUG_ERROR_PRINT(status);                     }                     DEBUG_PRINTF (" \n NDEF from Tag 1 to Tag 2 already copied \n");                 }                 /* Copy NDEF content from tag at index 1 to Tag at index 0*/                 else if(*value==1 && *value1==0)                 {                      DEBUG_PRINTF (" \n Copy NDEF from Tag 2 to Tag 1 \n");                     /* Check for NDEF presence */                     status = phalTop_CheckNdef(palTop, &bTagState1);                     status = ReadNdefMessage(PHAL_TOP_TAG_TYPE_T2T_TAG);                     DEBUG_ERROR_PRINT(status);                     status = phacDiscLoop_ActivateCard(pDataParams, PHAC_DISCLOOP_TECH_TYPE_A, 0x00);                     /* Check for NDEF presence */                     status = phalTop_CheckNdef(palTop, &bTagState1);                         if(bTagState1 == PHAL_TOP_STATE_READWRITE)                         {                         status = WriteNdefMessage(PHAL_TOP_TAG_TYPE_T2T_TAG);                         DEBUG_ERROR_PRINT(status);                         }                         DEBUG_PRINTF (" \n NDEF from Tag 2 to Tag 1 already copied \n");                 }                 DEBUG_PRINTF (" \n Please remove the tags \n\n");                 DEBUG_PRINTF (" \n Press any button to continue... \n\n");                                 /* Reading values from GPIOs 2 and 3 */                 do                 {                     phhalPcr_GetGpioVal(2,value);                     phhalPcr_GetGpioVal(3,value1);                 }while(*value==1 && *value1==1); /*                if(wNumberOfTags > 1)                 {                      Get 1st detected tag and activate device at index 0                     for(bIndex = 0; bIndex < PHAC_DISCLOOP_PASS_POLL_MAX_TECHS_SUPPORTED; bIndex++)                     {                         if(PHAC_DISCLOOP_CHECK_ANDMASK(wTagsDetected, (1 << bIndex)))                         {                             DEBUG_PRINTF("\t Activating device @ index 0\n");                             status = phacDiscLoop_ActivateCard(pDataParams, bIndex, 0);                             break;                         }                     }                     if( ((status & PH_ERR_MASK) == PHAC_DISCLOOP_DEVICE_ACTIVATED) ||                             ((status & PH_ERR_MASK) == PHAC_DISCLOOP_PASSIVE_TARGET_ACTIVATED))                     {                          Get detected technology type                         status = phacDiscLoop_GetConfig(pDiscLoop, PHAC_DISCLOOP_CONFIG_TECH_DETECTED, &wTagsDetected);                         CHECK_STATUS(status);                         GetTagInfo(pDataParams, 0x01, wTagsDetected);                         DEBUG_PRINTF("\t\t Activation successful\n");                     }                     else                     {                         DEBUG_PRINTF("\t\tCard activation failed\n");                     }                 }*/                 /* Switch to LISTEN mode if supported after POLL mode */             }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ In NfcrdlibEx3_NFCForum.h declare WriteNdefMessage(). /** * Write NDEF message to a detected tag. * */ phStatus_t WriteNdefMessage(     uint8_t TopTagType);      /* [in] Tag type to which write NDEF */‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ In NfcrdlibEx3_NFCForum.c define the function WriteNdefMessage(). /** * Writes NDEF Message to a tag */ phStatus_t WriteNdefMessage(uint8_t TopTagType) {     phStatus_t status;     uint8_t bTagState;     uint16_t wDataLength = 0;     /* Configure Top layer for specified tag type */     status = phalTop_SetConfig(palTop, PHAL_TOP_CONFIG_TAG_TYPE, TopTagType);     DEBUG_ERROR_PRINT(status);     /* Check for NDEF presence */     status = phalTop_CheckNdef(palTop, &bTagState);     DEBUG_ERROR_PRINT(status);     if(bTagState == PHAL_TOP_STATE_READWRITE)     {         /* Write NDEF message */         status = phalTop_WriteNdef(palTop, baSnepAppBuffer, NDEFlength);         DEBUG_ERROR_PRINT(status);         /* Print NDEF message, if not NULL NDEF */         if(NDEFlength)         {             DEBUG_PRINTF("\tNDEF detected...\n");             DEBUG_PRINTF("\tNDEF length: %d\n", wDataLength);             DEBUG_PRINTF("\tNDEF message:\n");             //DumpBuffer(aData, wDataLength);             DumpBuffer(baSnepAppBuffer, 50);         }         else         {             DEBUG_PRINTF("\tNDEF content is NULL...\n");         }     }     else     {         DEBUG_PRINTF("\tNo NDEF content detected...\n");     }     return status; }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ In NfcrdlibEx3_NFCForum.c define InitGPIOs(). void InitGPIOs(void) {     phhalPcr_ConfigInput(2,true,false,false,false,true,false);     phhalPcr_ConfigInput(3,true,false,false,false,true,false); }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Hardware configuration section: For the Hardware set up, two push buttons will be connected to GPIO_2 and GPIO_3 of PNEV7462B as follows. Vdd will be connected to 3V3 pin on the board: GND can be connected to any GND on the board. Demonstration: Each tag was previously written with a text NDEF message respectively.   Tag 1: Text: Tag1 Language: en   Tag 2: Text: Tag2 Language: en   Writing to a tag can be done by making use of our TagWriter app available in the play store: NFC TagWriter by NXP - Aplicaciones de Android en Google Play  First both tag's NDEF text messages will be displayed: Once the information is read, you'll be asked to select an option from the following menu: If left button (GPIO_2) is pressed, the content from Tag 1 will be written to Tag 2: Otherwise, If left button (GPIO_3) is pressed, the content from Tag 2 will be written to Tag 1: Please find the modified files attached. I hope this is of great help! Best regards, Ivan.
查看全文
Based on NFC reader library porting guide for LPC11u37h(Ver 5.12) ,We have a partial ported NFC reader library like below: Now, it is time to port other demos in this project. You may choose any demo, but here NfcrdlibEx2_AdvancedDiscoveryLoop is selected. and similar with before, the first step is creating a new build configuration: then in the project references, choose the LPCopen library for LPC11u37 instead. Change the MCU settings: Change the build settings: Change FreeRTOS portable to cortex M0: Search "PHDRIVER_LPC1769RC663_BOARD" in the source code of "NfcrdlibEx2_AdvancedDiscoveryLoop" project, and you may simply replace it with "PHDRIVER_LPC11U37RC663_BOARD", and there are only two places needs to be fixed. Search "PHDRIVER_LPC1769" in the source code of "NfcrdlibEx2_AdvancedDiscoveryLoop" project, and you may simply replace it with "PHDRIVER_LPC11U37". Most changes are in phApp_Init.c. Also please don't forget to enable optimization for size. Building result: Demo testing result:
查看全文
The NXP-NCI example is based on NXP-NCI lib and LPCopen lib, and due to the good consistency, the porting is mainly focus on LPCopen lib switching.   Software setup download lpcopen package via http://www.nxp.com/assets/downloads/data/en/software/lpcopen_3_01_lpcxpresso_nxp_lpcxpresso_11u68.zip  download SW3241 via https://www.nxp.com/webapp/Download?colCode=SW3241&amp;appType=license&amp;location=null&fsrch=1&sr=3&pageNum=1&Parent_n…  import NXP-NCI_LPC11Uxx_example by LPCXpresso v8.1.4.   LPCopen porting remove *.h and *.c in the folder of LPC11Uxx/inc and LPC11Uxx/src. 2.import header files and c files from lpc_chip_11u6x/inc and lpc_chip_11u6x/src to LPC11Uxx/inc and LPC11Uxx/src 3. repeat step 2 , import source files and header files from lpc_board_nxp_lpcxpresso_11u68/inc and lpc_board_nxp_lpcxpresso_11u68/src to Drivers/inc and Drivers/src. 4.Change MCU settings 5.Change project settings. 6.compiling error fixes: 6.1 solution: replace with i2c_11u6x.h 6.2 solution: 6.3 solution: create a template project for LPC11U6x and import the source file of "cr_startup_lpc11u6x.c"   Porting Result   This porting guide is for LPC11U68 Xpresso v2 Rev C, and can also be used a reference when you try to port NXP-NCI examples to other lpcxpresso boards.   Please kindly refer to the attachment for details. Original Attachment has been moved to: NXP-NCI_LPC11Uxx_example.zip
查看全文
This post contains a guide of how to use the NFC Reader Library with LPC845 using the Basic Discovery Loop example. The vanilla Basic Discovery Loop example is larger than the flash size of LPC845 (64KB), so the project needs to be reduced in size as well. How to reduce the size is explained in section “Porting the NFC Reader Library and reducing the size of project” A ready to use package “lpcxpresso845max_Basic_Discovery_Loop” example from the NFC Reader Library to be run on LPC845 and CLRC663 plus frontend is attached with this document. This document is structured as follows:   Overview of LPC845 The LPCXpresso-MAX family of boards provides a powerful and flexible development system for NXP's low-end Arm® Cortex®-M0+ based MCUs. They can be used with a range of development tools, including the MCUXpresso IDE toolchain. The LPCXpresso845-MAX board was created to enable evaluation of and prototyping with the LPC84x family of MCUs. Based on the Arm® Cortex®-M0+ core, LPC845 is a low-cost, 32-bit MCU family operating at frequencies of up to 30 MHz. The LPC845 MCU contains 64 KB of flash memory and 16 KB of SRAM.  Hardware Requirements Following hardware is required to run the project: LPCXpresso845-MAX development board. CLEV6630B board or BLE-NFC-V2 board. Both boards contain CLRC663 plus frontend. Here we use BLE-NFC-V2.   Connections Connect the two boards as follows: Porting the NFC Reader Library and reducing the size of Project: The porting of Basic Discovery Loop Example (NFC Reader Library) to LPC845 Max was done following the procedure mentioned in “NFC Reader Library Porting to i.MX RT1050” document. However, after completing the porting and building the project, the size of the binary, which is 134.264 KB, is greater than the size of Flash of LPC845 which is 64KB of flash. To reduce the size of the project, the following two steps were taken: 1. Apply compiler optimization for size. This can be done in the MCUXpresso by: Opening properties of project. Right Click project-   >Properties Go to Settings->Optimization. For Optimization Level choose “Optimize for Size” Building the project after this step results in a successful build but the project takes up 93% of all Flash, leaving very little space for adding more functionality. 2. The vanilla Basic discovery loop example detects all types of NFC tags. This increases our code size, so further size reduction can be achieved by limiting the number of protocols used. To limit our Basic Discovery loop to only look for Type A tags, do the following: Open the file “ph_NxpBuild_App.h” file which is inside in the “intfs” folder. This file defines the protocols (types) which are detected by the Basic Discovery Loop example. The type A cards uses the “ISO 14443-3A” protocol, so comment out all other protocol definitions except for “ISO 14443-3A” protocol as shown in Figure.   Building the project after this step takes up only 42.784KB of space consuming 65% of the Flash, leaving sufficient amount of space for adding application code.   Running Basic Discovery Loop on LPC845 If this is the first time you’re using the LPCXpresso845 Max board, follow the getting started guide first ->  LPC845Max | NXP . Make sure to install the SDK package LPCXpresso845 Max which is required for the project below to run. Download the “lpcxpresso845max_Basic_Discovery_Loop” package which you will find attached to this post. Drag and drop the downloaded package to the “Project Explorer” tab of your MCUXpresso IDE workspace (If you don’t have MCUXpresso, it can be downloaded for free from here: https://www.nxp.com/support/developer-resources/software-development-tools/mcuxpresso-software-and-tools/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE ) Now that the package has been imported to the MCUXpresso IDE (via drag and drop), click on Debug icon from the Quickstart panel to begin a debug session. Once the debug session has started, click on the run icon to run the code: After step 4, the project should be running now. The output “BasicDiscoveryLoop Example” can be seen in the console. The project contains basic discovery loop functionality. Bring any NFC card near the frontend’s RF antenna and the output console will show the detection and type of the card. Running other examples from NFC Reader Library on LPC845: Once the “lpcxpresso845max_Basic_Discovery_Loop” project is running on the LPC845, running other examples from NFC Reader Library is simple. Here we use the “NfcrdlibEx9_NTagI2C” example from the reader library to describe the process. In “intfs” folder remove everything except the “phaApp_Init.h” file. Then go to the “intfs” folder of the NFC Reader Library example you want to run (“NfcrdlibEx9_NTagI2C” in this case), and copy all the files except “phaApp_Init.h” and paste them in the original “intfs” folder.  In line 57 of the “ph_NxpBuild_App.h” file in “intfs” folder, replace  Go to “source” folder and remove every file except “phApp_Init.c“ and “semihost_hardfault.c” files. Then go to “src” folder of the example you want to run (“NfcrdlibEx9_NTagI2C” in this case) and copy all the files except “phaApp_Init.c” and paste them into the “source” folder.  Finally, copy the main file of the example you want to run (NfcrdlibEx9_NTagI2C in this case) and paste it into the “source” folder as well. The project is ready to build and run on LPC845. Available Resources: Porting NFC Reader Library to i.MX RT1050. (Detailed Description of porting) https://community.nxp.com/docs/DOC-341843 NFC Reader Library  NFC Reader Library | NXP  LPC845 Max  LPCXpresso845-MAX Board for LPC84x Microcontrollers (MCUs) | NXP 
查看全文
Hello NFC community,  as you may know the The PN7462 family consists of 32-bit Arm® Cortex®-M0-based NFC microcontrollers offering high performance and low power consumption. It has a simple instruction set and memory addressing along with a reduced code size compared to existing architectures. PN7462 family offers an all-in-one-solution, with features such as NFC, supporting all NFC Forum modes, microcontroller, optional contact smart card reader, and software in a single chip. It operates at CPU frequencies of up to 20 MHz. and  MIFARE® Ultralight-based tickets offer an ideal solution for low-cost, high-volume applications such as public transport, loyalty cards and event ticketing. They serve as a perfect contactless replacement for magnetic stripe, barcode, or QR-code systems. The introduction of the contactless MIFARE Ultralight® ICs for limited-use applications can lead to reduced system installation and maintenance costs. As you may know the MIFARE family has the Ultralight C tag which is a contactless IC supporting 3DES cryptography is mostly used in limited use applications such smart ticketing, this tag complies with ISO 14443-3 type A and it is defined as type 2 tag. In this document I am going to show you how to modify an example that is provided in the NXP Reader Library to authenticate to a not personalized Mifare Ultralight C and perform a Read operation. Materials: PN7462 or PNEV7462 ( this is the evaluation board  from NXP) PN7462 Reader library Mifare Ultralight C Mifare Ultralight C Data sheet MCUXpresso First we are going to go to  NfcrdlibEx4_MIFAREClassic.c, I am going to explain as much as I can with comments in the code and add some information here we are going to  add the following include: #define MFULC_READ_DATA_SIZE 16 /* Number of bytes that is read by MIFARE Ultralight Read command */ #define MFULC_USER_MEMORY_BEGIN 0x04 /* Number of bytes that is read by MIFARE Ultralight Read command */ #define MFULC_PAGE_SIZE 0x04 /* Size of page of MIFARE Ultralight card */ #define KEYCOUNT 0x7FU /* number of keys */ #define KEYVERSIONS 0x01U /* number of key versions */ #define RAND_KEY_2K3DES_ADDRESS 0x01U /* Random 2K3DES key address in keystore */ #define RAND_KEY_2K3DES_VERSION 0x00U /* Random 2K3DES key version in keystore */ #define UL_C_KEY_ADDRESS 0x02U /* Ultralight C key address in keystore */ #define UL_C_KEY_VERSION 0x00U /* Ultralight C key version in keystore */ #define KEY_POSITION 0x00U /* Key position */ ‍ ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ after this in the Global Variable declaration section we will have to add the following: phCryptoSym_Sw_DataParams_t cryptoEnc; /* CryptoSym parameter structure for ENC */ phCryptoSym_Sw_DataParams_t cryptoSymRng; /* CryptoSym parameter structure for SymRng */ phCryptoRng_Sw_DataParams_t cryptoRng; /* CryptoRng parameter structure for Rng */ phKeyStore_Sw_DataParams_t keyStore; /* KeyStore parameter structure */ static uint8_t gaUlcKey[] = {0x49, 0x45, 0x4D, 0x4B, 0x41, 0x45, 0x52, 0x42, 0x21, 0x4E, 0x41, 0x43, 0x55, 0x4F, 0x59, 0x46}; phacDiscLoop_Sw_DataParams_t * pDiscLoop; /* Discovery loop component */ void *psKeyStore; void *psalMFUL; void *ppalMifare;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ the variable static uint8_t gaUlcKey[] = {0x49, 0x45, 0x4D, 0x4B, 0x41, 0x45, 0x52, 0x42, 0x21, 0x4E, 0x41, 0x43, 0x55, 0x4F, 0x59, 0x46}; this is the key for default in the Mifare Ultralight c as stated in the datasheet section 7.5.6 this is a reference for the key we should be using. Then we are going to change the PAL variables /*PAL variables*/ phKeyStore_Sw_KeyEntry_t aKeyEntry[KEYCOUNT]; phKeyStore_Sw_KeyVersionPair_t aKeyVersion[KEYCOUNT * KEYVERSIONS]; phKeyStore_Sw_KUCEntry_t aKeyUsageCounter[KEYCOUNT]; uint8_t bDataBuffer[DATA_BUFFER_LEN]; /* universal data buffer */ uint8_t bSak; /* SAK card type information */ uint16_t wAtqa; /* ATQA card type information */ ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ then we are going to change this in line 131 psalMFC = phNfcLib_GetDataParams(PH_COMP_AL_MFC);‍‍‍ to psalMFUL = phNfcLib_GetDataParams(PH_COMP_AL_MFUL);‍‍‍ so this get the MIFARE Ultralight AL-Components, then after this line we are going to add  ppalMifare = phNfcLib_GetDataParams(PH_COMP_PAL_MIFARE);‍‍‍  then we are going to erase the Mifare classic  functionality to avoid any kind of error due to Mifare classic not being present in the field.and add the following: First we are going to proceed with the Authentication part, we are going tu use the API phalMful_UlcAuthenticate(pDataParams, wKeyNumber, wKeyVersion);  the first  parameter is the structure pointing to the tag that was activated by the discoveryloop, then the key address and last the  version of the key. as you can see we do not send the key we only tell the tag where is the key stored and the version if it was updated. to ensure the confidentiality of the communication. /* Authenticate with the Key even if no memory of Ultralight Card is restricted by Authentication access Authentication with correct key provides access to any part of the memory (beside key storage) . */ /* Send authentication for entire Ultralight C */ status = phalMful_UlcAuthenticate(psalMFUL, UL_C_KEY_ADDRESS, UL_C_KEY_VERSION); /* Check for Status */ if ((status & PH_ERR_MASK) != PH_ERR_SUCCESS) { /* Print Error info */ DEBUG_PRINTF("\nAuthentication Failed!!!"); DEBUG_PRINTF("\nPlease correct the used key"); DEBUG_PRINTF("\nExecution aborted!!!\n"); break; } DEBUG_PRINTF("\nAuthentication Successful"); /* ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ after this the status should be  OK  and no error found, if you have an error in this please check that the card you are using was not tampered before and changed the key or if you distributor delivered a configured key please be sure to use the correct key. then we are going to proceed to the Read operation: phalMful_Read(pDataParams, bAddress, pData) as you can see  the first parameter is the same as authentication because we are still talking to the same tag,  the MFULC_USER_MEMORY_BEGIN its value is 04 this is because as you can see in the datasheet section 7.5 Memory organization the user memory starts in page 4 and ends in page 39 so we just want to read the first page of the tag and the bDataBuffer variable will store the received information. /* *************** READ operation ****************************** */ /* Empty the bDataBuffer */ memset(bDataBuffer, '\0', DATA_BUFFER_LEN); DEBUG_PRINTF("\n\nRead data from page %d, %d, %d, %d", MFULC_USER_MEMORY_BEGIN, MFULC_USER_MEMORY_BEGIN + 1, MFULC_USER_MEMORY_BEGIN + 2, MFULC_USER_MEMORY_BEGIN + 3); /* Read data from custom */ status = phalMful_Read(psalMFUL, MFULC_USER_MEMORY_BEGIN, bDataBuffer); /* Check for Status */ if (status != PH_ERR_SUCCESS) { /* Print Error info */ DEBUG_PRINTF("\nRead operation failed!!!\n"); DEBUG_PRINTF("\nExecution aborted!!!\n\n"); break; /* Break from the loop*/ } DEBUG_PRINTF("\nRead Success"); DEBUG_PRINTF("\nThe content of page %d is:\n", MFULC_USER_MEMORY_BEGIN); phApp_Print_Buff(&bDataBuffer[0], MFULC_READ_DATA_SIZE);‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ and that is all of our project, this is a simple project but can help a lot of people to understand how to work with Mifare Ultralight C using the PN7462 and then help people to start doing more complex examples based on this project. if you want to know how to configure a Mifare Ultralight c product using our PEGODA reader please check the document I posted called "Mifare Ultralight C - Changing default password and protecting page address". if you have any questions please let me know. BR Jonathan
查看全文
This post contains step by step guide of how to use NTAG I²C plus with i.MX RT MCUs. The goal of this post is to enable developers to start developing their NFC Applications using NTAG I²C plus and i.MX RT MCUs quickly and easily. Attached with this post are two ready to use packages: ‘evkbimxrt1060_ntagI2C’ is to be used with MIMXRT1060-EVK and NTAG I²C plus kit for Arduino pinout. ‘evkbimxrt1050_ntagI2C’ is to be used with MIMXRT1050-EVK and NTAG I²C plus kit for Arduino pinout. Both packages contain the same example code but are configured for the two different boards. The example code demonstrates the following basic operations: Reading the EEPROM of NTAG I²C plus. Writing NTAG messages to NTAG I²C plus. Reading SRAM of NTAG I²C plus. Writing to SRAM of NTAG I²C plus. Using Field detect pin as interrupt to turn on an LED when an RF field is detected by the NTAG I²C board. The document has been structured as follows: NTAG I²C plus kit for Arduino pinout The NTAG I²C plus Arduino kit consist of two PCBs stacked together: The upper PCB is the antenna board with the connected tag The lower PCB is an interface adaptor board to the Arduino pinout This kit can be used to connect and evaluate the NTAG I²C plus  into many popular MCUs with Arduino compliant headers, for example:  Kinetis (e.g. KW41Z, i.MX (e.g. UDOO Neo, i.MX 6UL, i.MX 6 ULL, i.MX 7D), LPC MCUs (e.g. LPCXpresso MAX, V2 and V3 boards) and i.MX RT boards (e.g. i.MX RT1050, i.MX RT1060) The kit support package includes several software examples. The OM29110ARD is a generic interface board which offers support for connection to any PCB implementing Arduino connectors. It exposes: 3.3V and 5V power supply pins. I2C, SPI and UART host interfaces. Generic GPIOs (e.g. to be used for field detect, interrupts, reset pins or others) As such, it allows the NTAG I²C plus to be plugged into Arduino devices seamlessly. Hardware Requirements EVKB-IMXRT1050 board or EVKB-IMXRT1060 board. NTAG I²C plus kit for Arduino pinout (OM23221ARD) Cables: Micro USB cable 6 jumper wires Male to Female (Only required if using EVKB-IMXRT1050 board) Using NTAG I²C plus kit for Arduino pinout with EVKB-IMXRT1060 Hardware Connections The hardware connections are simple. Both the EVKB-IMXRT1060 board and OM23221ARD (NTAG I²C plus) board have Arduino interface. So simply connect both as shown in figure:  Running the Demo Follow the below mentioned steps to run the demo: Download the ‘evkbimxrt1060_ntagI2C’ package which you will find attached to this post.  Drag and drop the downloaded package to your MCUXpresso IDE workspace (If you don’t have MCUXpresso, it can be downloaded for free from here: https://www.nxp.com/support/developer-resources/software-development-tools/mcuxpresso-software-and-tools/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE Now that the package has been imported to the MCUXpresso IDE, click on Debug icon from the Quickstart panel to begin a debug session. Once the debug session has started click on the run icon to run the code:                                 Note:  If this is your first time using IMXRT1060EVK board, it is recommended to follow the getting started guide first ( i.MX RT1060 Evaluation Kit | NXP  ) To see the output, you need to have a terminal application installed (like Tera term or PuTTY). The output looks like this:                                                    Using NTAG I²C plus kit for Arduino pinout with EVKB-IMXRT1050 Hardware Connections In case of EVKB-IMXRT1050, the I2C pins on the Arduino interface’s J24 pin 9 and 10 are only connected to the i.MX RT slave I²C port, not to a master I²C port. So, we cannot just plug in the NTAG I²C plus kit, instead we need to connect two boards with the help of jumper wires. The connections required are show in figure below.                                Running the Demo Download the ‘evkbimxrt1050_ntagI2C’ package which you will find attached to this post. Drag and drop the downloaded package to your MCUXpresso IDE workspace (If you don’t have MCUXpresso, it can be downloaded for free from here: https://www.nxp.com/support/developer-resources/software-development-tools/mcuxpresso-software-and-tools/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE Now that the package has been imported to the MCUXpresso IDE, click on Debug icon from the Quickstart panel to begin a debug session. Once the debug session has started click on the run icon to run the code:                                Note:  If this is your first time using IMXRT1050EVK board, it is recommended to follow the getting started guide first ( i.MX RT1050 Evaluation Kit | NXP  ) To see the output, you need to have a terminal application installed (like Tera term or PuTTY). The output looks like this:                                            Porting the Package to any other i.MX RT Boards    If you want to use NTAG I²C plus with i.MX RT boards other than the i.MX RT1050 or the i.MX RT1060, then you’ve       to port the example package. This is fairly straightforward and the procedure is described below: Import the ‘hello world’ project from the SDK of the board to which you want to port the package. (SDKs for every board are freely available for download from the MCUXpresso SDK Builder website).We will modify this ‘hello world’ project adding code from attached packages, to make it work on the desired board.                                     Copy the following folders from the attached ‘evkbimxrt1060_ntagI2C’ or ‘evkbimxrt1050_ntagI2C’ package to the ‘hello world’ project imported in step 1:                               Copy the two files to the ‘drivers’ folder of ‘hello world’ project: Delete the ‘hello_world.c’ file from the source folder: Now copy the following preprocessor micros from ‘evkbimxrt1060_ntagI2C’ or ‘evkbimxrt1050_ntagI2C’ package to ‘hello world’ project:      Preprocessor settings can be found by right clicking Project-Properties>C++Build > Settings  Now we need to change the project configuration:        a.  Add the newly copied folders to source location; Right click on Project->Properties and add the following        folders:    b.  Include paths to the added libraries in the project. These can be copied from the from ‘evkbimxrt1060_ntagI2C’ or ‘evkbimxrt1050_ntagI2C’ package. Open project->properties and copy the following in the respective places as shown in the images:  Change pin configurations according to the board pins you are using:             a. For changing field detect pin, the code can be found in the source file:                   b. For I2C instance, the lines of code are in app_ntag->app_ntag.h:              c. These pins also need to be initialized which can be done through the pin initialization tool of MCUXpresso or code can be added to the ‘board.c’ file in ‘board’ folder. Once these changes are done, porting is complete. Build the project, it should build without any errors. Available resources BLE pairing with NFC on KW41 and NTAG I²C plus source code www.nxp.com/downloads/en/snippets-boot-code-headers-monitors/SW4223.zip NTAG I²C plus kit for Arduino pinout www.nxp.com/demoboard/OM23221ARD    
查看全文
As NFC reader library 5.12 also supports PN5180, switching the NFC frontend from CLRC663 to PN5180 is quite easy based on previous porting. The porting also includes the hardware settings and software modification. Hardware Setup for porting: a) Remove resistors on PNEV5180B to disconnect the onboard lpc1769 from PN5180, following steps on page 16 of https://www.nxp.com/docs/en/application-note/AN11908.pdf  b) Connect LPCXpresso board for LPC11U37 with PNEV5180 as below: Software Modification for porting: 1. Make a copy of Board_Lpc11u37Rc663.h , and change its name to "Board_Lpc11u37Pn5180.h", and import it into the DAL/boards folder. 2.Change the source code in the header file as below: 3. Add two more pins' definition and configuration for BUSY and DWL pins of PN5180, and new configuration for reset pin. and modify the reset logic: 4.Change the IRQ interrupt trigger type to rising edge. 5.Include this header file in BoardSelection.h 6.Add this new configuration in ph_NxpBuild_App.h 7.Add this new configuration in phApp_Init.h 8.Add this new configuration in ph_NxpBuild_Platform.h 9.Add this new configuration in Settings. 10.Building result: Testing result:
查看全文
Environments & Devices --Hardware 1、PN7462 DEMO Board(PNEV7642B) --Software 1、Ubuntu 16.04 desktop 2、Test tools ---libusb ---pcsc-lite ---ccid driver ---opensc          Before testing, please install above test tools to Ubuntu 16.04 according to document on the link https://community.nxp.com/docs/DOC-334952 !          Then follow steps below to begin testing PN7462 DEMO board by above test tools. 1、Update firmware of PN7462 DEMO board          Please update firmware of PN7462 DEMO board according to UM10915.pdf, then test it on windows, ensuring PN7462 DEMO board can normally work at CCID protocol on window platform. 2、Connecting PN7462 DEMO Board to PC USB via USB OTG Cable.          On PENV7462B side, X3 connector should be used for USB OTG cable. 3、Using lsusb to list USB devices weidong@ubuntu:~$ lsusb Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 004: ID 0e0f:0008 VMware, Inc. Bus 002 Device 005: ID 1fc9:0117 NXP Semiconductors          Last line is PN7472 DEMO board. 4、Open 2 terminals at the same time on Ubuntu desktop (1) One terminal is used to run “pcsc” command weidong@ubuntu:~$ sudo /usr/local/sbin/pcscd -adf [sudo] password for weidong: 00000000 pcscdaemon.c:345:main() pcscd set to foreground with debug send to stdout 00012288 configfile.l:361:DBGetReaderList() Parsing conf file: /usr/local/etc/reader.conf.d 00000037 pcscdaemon.c:658:main() pcsc-lite 1.8.22 daemon ready. 00023126 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001 00000101 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001 00000113 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0003, path: /dev/bus/usb/002/002 00000112 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001 00000160 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0002, path: /dev/bus/usb/002/003 00000152 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0008, path: /dev/bus/usb/002/004 00000115 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0008, path: /dev/bus/usb/002/004 00000165 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x0E0F, PID: 0x0002, path: /dev/bus/usb/002/003 00000263 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001 ^V56546837 hotplug_libudev.c:651:HPEstablishUSBNotifications() USB Device add 00000101 hotplug_libudev.c:297:get_driver() Looking for a driver for VID: 0x1FC9, PID: 0x0117, path: /dev/bus/usb/002/006 00000007 hotplug_libudev.c:436:HPAddDevice() Adding USB device: PN7462 USB Reader 00000045 readerfactory.c:1074:RFInitializeReader() Attempting startup of PN7462 USB Reader (1.00) 00 00 using /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so 00127887 readerfactory.c:949:RFBindFunctions() Loading IFD Handler 3.0 00000236 ifdhandler.c:1965:init_driver() Driver version: 1.4.27 00000477 ifdhandler.c:1982:init_driver() LogLevel: 0x0003 00000004 ifdhandler.c:1993:init_driver() DriverOptions: 0x0000 00000165 ifdhandler.c:111:CreateChannelByNameOrChannel() Lun: 0, device: usb:1fc9/0117:libudev:0:/dev/bus/usb/002/006 00000021 ccid_usb.c:302:OpenUSBByName() Using: /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist 00000727 ccid_usb.c:320:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau@free.fr) 00000016 ccid_usb.c:321:OpenUSBByName() ifdProductString: Generic CCID driver 00000004 ccid_usb.c:322:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version. 00000433 ccid_usb.c:656:OpenUSBByName() Found Vendor/Product: 1FC9/0117 (PN7462 USB Reader) 00000005 ccid_usb.c:658:OpenUSBByName() Using USB bus/device: 2/6 00000021 ccid_usb.c:717:OpenUSBByName() bNumDataRatesSupported is 0 00128471 ifdhandler.c:382:IFDHGetCapabilities() tag: 0xFB3, usb:1fc9/0117:libudev:0:/dev/bus/usb/002/006 (lun: 0) 00000027 readerfactory.c:396:RFAddReader() Using the reader polling thread 00004709 ifdhandler.c:382:IFDHGetCapabilities() tag: 0xFAE, usb:1fc9/0117:libudev:0:/dev/bus/usb/002/006 (lun: 0) 00000023 ifdhandler.c:477:IFDHGetCapabilities() Reader supports 1 slot(s) (2)The other terminal is used to run “"testpcsc " in pcsc-lite/src source code weidong@ubuntu:~/ccid/pcsc-lite-1.8.22/src$ ./testpcsc   MUSCLE PC/SC Lite unitary test Program   THIS PROGRAM IS NOT DESIGNED AS A TESTING TOOL FOR END USERS! Do NOT use it unless you really know what you do.   Testing SCardEstablishContext        : Command successful. Testing SCardIsValidContext   : Command successful. Testing SCardIsValidContext   : Invalid handle. (don't panic) Testing SCardListReaderGroups      : Command successful. Group 01: SCard$DefaultReaders Testing SCardFreeMemory               : Command successful. Testing SCardListReaders        : Command successful. Testing SCardListReaders        : Command successful. Reader 01: PN7462 USB Reader (1.00) 00 00 Waiting for card insertion        :          2 screenshots for above 2 terminals: 5、Test cards (All cards are contactless) (1) MIFARE Plus x 4K card Re move it: (2) MIFARE Nano card          Note: testpcsc should be run again. Remove it: (3) MIFARE EV1 card Remove it: 6、Using Opensc-tool to Test cards            Open a new terminal for running the command, please! (1)No cards (2) MIFARE Plus x 4K card (close to antenna , then run opensc-tool) (3) MIFARE Nano card (4) MIFARE EV1 card    TIC Weidong Sun 2018-07-09
查看全文
The latest NXP-NCI example is rev 1.6, and when you run this demo with the lpc11xx board, for example, lpc1115 rev A, and the OM5577, you may meet the following issue: The problem is due to two aspects: one is hardware and the other is software. For hardware solution, besides following what is described in AN11658 section 2.4 LPC11xx, you have to do one more thing: a) The I2C lines are not pulled-up: LPC11xx doesn't offer internal pull-up setting of the I2C lines so external pull-up resistors must be added. For software solution, the function of Sleep()( in tool.c) was optimized too much, and it didn't meet the timing requirement of OM5577, so we should let the IDE ignore it. The solution I use is as below: __attribute__((optimize("O0"))) void my_func() { blah } You may check the attachment for details. The result is shown as below: Original Attachment has been moved to: tool.c.zip
查看全文
This post contains step by step guide of how to use the NTAG I²C plus with LPC55S69. This is easy and straightforward to do, since the MCUXpresso SDK Builder tool has an option to add NTAG I²C plus example directly to SDK of LPC55S69. Hardware Needed: LPC55S69-EVK NTAG I²C plus explorer kit Follow the following simple steps to use NTAG I²C plus with LPC55S69: Download and install MCUXpresso IDE (if you don’t have it already). It can be download for free by clicking here: Next step is to use the MCUXpresso SDK Builder tool to build and download the SDK for LPC55S69. For this: Go to  the MCUXpresso SDK Builder website: https://mcuxpresso.nxp.com/en/select Select the LPC55S69 board and then click on ‘Build MCUXpresso SDK’ button: Click on ‘Add Software component’, then select the NTAG I2C component, click ‘Save changes’ and then download the SDK. Drag and drop the downloaded SDK to the installed SDK’s tab in the MCUXpresso IDE to install it. Click on the ‘Import SDK example(s)’ in the Quickstart Panel in the MCUXpresso IDE. Then select LPC55S69, ‘check the ntag_i2c_plus_example’ box and hit ‘Finish’. Connect the LPC55S69 and NTAG I²C plus boards together. Details of these connections can be found in the “readme.txt” file in the “doc” folder of the project: Finally click on debug in the Quickstart Panel to build the project, flash it to the MCU, and start debugging. This is how the output looks like in the Console tab of IDE: Bring any active nfc device (e.g. an NFC phone with NFC enabled) near the ntagi2c board. The program will detect it and consequently blink the LED as well as display a message on the console: Read the “readme.txt” file for more details regarding the project. Available Resources: BLE pairing with NFC on KW41 and NTAG I²C plus source code www.nxp.com/downloads/en/snippets-boot-code-headers-monitors/SW4223.zip NTAG I²C plus kit for Arduino pinout www.nxp.com/demoboard/OM23221ARD
查看全文
This document provides a step by step guide of how to use the CLRC663 plus with i.MX RT1050. For this purpose, we need to port the NFC Reader Library to i.MX RT1050.  There are two zip files attached to this document: 1. "NFCReaderLibrary_IMXRT1050_Porting Guide +DAL_IMXRT1050_BLE-NFC-V2.zip" : This folder is pre-configured for those who want to use BLE-NFC-v2 board with i.MX RT1050. 2. "NFCReaderLibrary_IMXRT1050_Porting Guide +DAL_IMXRT1050_CLEV6630B.zip" : This folder is pre-configured for those who want to use CLEV6630B board with i.MX RT1050. A video describing how to use i.MX RT1050 with CLRC663 Plus Family is available by clicking this link (Using i.MX RT 1050 with CLRC663 plus family |NXP ) as well. 
查看全文
Hello NFC community, MIFARE® Ultralight-based tickets offer an ideal solution for low-cost, high-volume applications such as public transport, loyalty cards and event ticketing. They serve as a perfect contactless replacement for magnetic stripe, barcode, or QR-code systems. The introduction of the contactless MIFARE Ultralight® ICs for limited-use applications can lead to reduced system installation and maintenance costs. As you may know the MIFARE family has the Ultralight C tag which is a contactless IC supporting 3DES cryptography is mostly used in limited use applications such smart ticketing, this tag complies with ISO 14443-3 type A and it is defined as type 2 tag, in this document I want to show you the procedure to change the default key to a custom key also to protect certain areas in the tag so the authentication is needed to perform a read or write operation. --------------------------------------------------------------------------------------------------- For this document I used : MFEV710: PEGODA Contactless Smart Card Reader RFIDDiscover Software Lite version  Full Version Available in Docstore Mifare Ultralight c --------------------------------------------------------------------------------------------------- Information Old Key : 49454D4B41455242214E4143554F5946 New Key : 88776655443322117766554433221199 Data sheet ---------------------------------------------------------------------------------------------------- First we start with the procedure to activate the tag and the anticollision procedure explained in the ISO/IEC 14443-3. Command Direction    ">" this direction is command send from PCD (Reader) to PICC(Ultralight c)    "<" this direction is command send from PICC (Ultralight c) to PCD (Reader)    "=" Prepare this command before sending Command   Data message REQA =  Request Command, Type A >  26 ATQA = Answer To Request, Type A  <  4400 SEL + NVB = SEL (Select code for cascade level ) 93, NVB (Number of Valid bits) 20 >  9320 ANTICOLLISION START <  8804598356   >  93708804598356 SAK (Select Acknowledge) = indicates additional cascade level <  x04   >  9520   <  E1ED2580A9   >  9570E1ED2580A9   <  x00 UID = 045983E1ED2580  ** the following procedure is explained in section 7.5.5 from the datasheet** Command   Data message Authenticate Part 1  (command 1A) >  1A00   <  AFA1ED1D682E5101422CC7 Authenticate Part 2 (command AF) >  AF2970D895F186D0302970D895F186D030188AAF4DAF68C5B9   <  006BD027CEC3E04EBC6919 [AUTHENTICATED] Then according to  section 7.5.7 of the datasheet the sections  where the 3DES key are saved are the 2C (Page 44) to the 2F (Page 47). We proceed to  write our new key using the A2 (WRITE command) Command   Data message DATA = byte 07,06,05,04 = 11223344 WRITE to page 44 (2C) >  A22C11223344 Positive acknowledge (ACK) <  0A DATA = byte 03,02,01,00 = 55667788 WRITE to page 45 (2D) >  A22D55667788  Positive acknowledge (ACK) <  0A DATA = byte 0F,0E,0D,0C = 99112233 WRITE to page 46 (2E) >  A22E99112233  Positive acknowledge (ACK) <  0A DATA = byte 0B,0A,09,08 = 44556677 WRITE to page 47 (2F) >  A22F44556677  Positive acknowledge (ACK) <  0A [RESET FIELD] [Authenticate with new key] Command   Data message Authenticate Part 1  (command 1A >  1A00   <  AFFAE2EFF17FAAD69862E7 Authenticate Part 2 (command AF) >  AFFD5794F2D4EA1B19FD5794F2D4EA1B196CF420CD4D9E8104   <  0030922228601939B8FA18 [AUTENTICATED WITH NEW KEY] we proceed to define from which sector the authentication is needed in order to read or write, to do this we use a write command to the AUTH0 (AUTH0 defines the page address from which the authentication is required. Valid address values for byte AUTH0 are from 03h to 30h.) the AUTH0 is located on the section 2A please check table 5 from #datasheet. **for this example we will define that from page 6 (06) we will need authentication to perform a read or write operation** Command   Data message WRITE command (A2) to AUTH0 (2A) from page 6 (06) >  A22A06000000 Positive acknowledge (ACK) <  0A Now the Read capabilities from page 06  require an Authentication in order to be read or written. Hope you find this document useful to get a better understanding of the behavior of the Ultralight C and how its security features can help you in your applications. Have a great day! BR Jonathan
查看全文