NFC Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NFC Knowledge Base

Discussions

Sort by:
A Quick Solution for link issue of "missing --end-group" when you use the latest MCUXpresso IDE to compile the NFC reader library projects.
View full article
     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.  
View full article
Using an alternative clock source to set up PN7462's contact interface clock , so that we have more options of the clock frequency.
View full article
Hello NFC community, The purpose of this document is to show the steps to port the Bluetooth pairing example for NTAG I²C Plus from KW41Z to KW36.  Setup For this, we will work with following boards: 1. Arduino NTAG I²C plus board (OM23221ARD) development kit. 2. KW36 Freedom board.  Download SDK as mentioned in chapter 2.1.3 of KW41Z User Manual and pay close attention to include NTAG I²C middleware. Now, repeat the same procedure above for FRDM KW36, this will be the SDK on which we will be making the modifications for the porting. NOTE: Unlike KW41Z, for KW36 there is no NTAG I²C plus middleware as shown in the image below: Save changes and build the SDK. NTAG I²C middleware will have to be imported from KW41Z's SDK in MCUXPresso. Install the SDK and import hid _device freertos example into the workspace: Copy ntag_i2c_plus_1.0.0 folder from KW41Z workspace to KW36's Open folder properties and uncheck Exclude resources from build, then apply and close. In board.c file add the following code below BOARD_DCDCInit()  /* Init DCDC module */ BOARD_DCDCInit(); #ifdef NTAG_I2C /* Init I2C pins for NTAG communication */ BOARD_InitI2C(); #endif // NTAG_I2C‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ In AppIMain.c add the following code in main_task before calling App_Thread()  #ifdef NTAG_I2C /* Initialize I2C for NTAG communication */ HAL_I2C_InitDevice(HAL_I2C_INIT_DEFAULT, I2C_MASTER_CLK_SRC, NTAG_I2C_MASTER_BASEADDR); SystemCoreClockUpdate(); /* Initialize the NTAG I2C components */ ntag_handle = NFC_InitDevice((NTAG_ID_T)0, NTAG_I2C_MASTER_BASEADDR); // HAL_ISR_RegisterCallback((ISR_SOURCE_T)0, ISR_LEVEL_LO, NULL, NULL); #endif // NTAG_I2C‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ In ApplMain.c add the following under Public memory declarations /************************************************************************************ ************************************************************************************* * Public memory declarations ************************************************************************************* ************************************************************************************/ ... #ifdef NTAG_I2C NFC_HANDLE_T ntag_handle; // NTAG handle #endif // NTAG_I2C‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Include new headers to the following: In ApplMain.c include the following  #ifdef NTAG_I2C /* NTAG middleware module */ #include "HAL_I2C_driver.h" //#include "HAL_I2C_kinetis_fsl.h" #include <app_ntag.h> #endif //NTAG_I2C‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ In hid_device.c include the following #ifdef NTAG_I2C /* NTAG handler */ #include <app_ntag.h> #endif // NTAG_I2C‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Copy app_ntag.c and app_ntag.h files from KW41Z  workspace to KW36's. The app_ntag.c source file contains sample functions for working with NDEF messages. Function NFC_MsgWrite() creates and writes the NDEF message in the Type-2 Tag format to the NTAG I2C chip through the ntag_i2c_plus middleware. The write algorithm is NFC-Forum compliance. Function NDEF_Pairing_Write() contains a procedure to create a BTSSP record via using the NDEF library. The same is performing function NDEF_Demo_Write() function. Here is shown how to create NDEF multi-record that contains several types of NDEF records. The app_ntag.h header file contains predefined blocks of constants (constant fields of data) that are written to the NTAG I2C chip by default during the communication which requires set the default content to the chip’s registers or erase the NTAG I2C chip user memory and registers of lock bytes. NOTE: Please change the I²C Master base address and I²C Master clock source from I2C1 to I2C0 as below in app_ntag.h: In hid_device.c make the implementation in BleApp_HandleKeys() as below. This is an extension for BLE pairing and writing NDEF messages to NTAG I²C. void BleApp_HandleKeys(key_event_t events) { #ifdef NTAG_I2C uint32_t timeout = NDEF_WRITE_TIMEOUT; // static uint8_t boApplStart = TRUE; switch (events) { case gKBD_EventPressPB1_c: // short press of SW4 { // if (boApplStart) // { /* first time startup */ BleApp_Start(); // boApplStart = FALSE; // } // boNDEFState = TRUE; // pairing via NDEF is allowed in case the apk. is running TurnOffLeds(); /* added to copy the pairing NDEF message to NTAG_I2C chip */ if (NDEF_Demo_Write()) { // report an error during creating and writing the NDEF message LED_RED_ON; } else { // indication of success by orange color on the RGB LED LED_RED_ON; LED_GREEN_ON; } /* Start advertising timer */ TMR_StartLowPowerTimer( mNDEFTimerId, gTmrLowPowerSecondTimer_c, TmrSeconds(timeout), NDEFTimerCallback, NULL); break; } case gKBD_EventPressPB2_c: // short press of SW3 { TurnOffLeds(); /* added to copy the pairing NDEF message to NTAG_I2C chip */ if (NDEF_Pairing_Write()) { // report an error during creating and writing the NDEF message LED_RED_ON; } else { // indication of success by green color on the RGB LED LED_GREEN_ON; } /* Start advertising timer */ TMR_StartLowPowerTimer( mNDEFTimerId, gTmrLowPowerSecondTimer_c, TmrSeconds(timeout), NDEFTimerCallback, NULL); break; } case gKBD_EventLongPB1_c: // long press of SW4 { if (mPeerDeviceId != gInvalidDeviceId_c) { Gap_Disconnect(mPeerDeviceId); boNDEFState = FALSE; } break; } case gKBD_EventLongPB2_c: // long press of SW3 { #if gAppUsePrivacy_d if( mAdvState.advOn ) { mAppPrivacyChangeReq = reqOff_c; /* Stop Advertising Timer*/ TMR_StopTimer(mAdvTimerId); Gap_StopAdvertising(); } else if( gBleSuccess_c == BleConnManager_DisablePrivacy() ) { TMR_StartLowPowerTimer(mPrivacyDisableTimerId, gTmrLowPowerSingleShotMillisTimer_c, TmrSeconds(mPrivacyDisableDurationSec_c), PrivacyEnableTimerCallback, NULL); } #endif break; } default: break; } #else // NTAG_I2C switch (events) { case gKBD_EventPressPB1_c: { BleApp_Start(); break; } case gKBD_EventPressPB2_c: { hidProtocolMode_t protocolMode; /* Toggle Protocol Mode */ Hid_GetProtocolMode(service_hid, &protocolMode); protocolMode = (protocolMode == gHid_BootProtocolMode_c)?gHid_ReportProtocolMode_c:gHid_BootProtocolMode_c; Hid_SetProtocolMode(service_hid, protocolMode); break; } case gKBD_EventLongPB1_c: { if (mPeerDeviceId != gInvalidDeviceId_c) Gap_Disconnect(mPeerDeviceId); break; } case gKBD_EventLongPB2_c: { #if gAppUsePrivacy_d if( mAdvState.advOn ) { mAppPrivacyChangeReq = reqOff_c; /* Stop Advertising Timer*/ TMR_StopTimer(mAdvTimerId); Gap_StopAdvertising(); } else if( gBleSuccess_c == BleConnManager_DisablePrivacy() ) { TMR_StartLowPowerTimer(mPrivacyDisableTimerId, gTmrLowPowerSingleShotMillisTimer_c, TmrSeconds(mPrivacyDisableDurationSec_c), PrivacyEnableTimerCallback, NULL); } #endif break; } default: break; } #endif //NTAG_I2C }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Add the declaration of the timer handler in Private memory declarations section of hid_device.c  /************************************************************************************ ************************************************************************************* * Private memory declarations ************************************************************************************* ************************************************************************************/ ... #ifdef NTAG_I2C static tmrTimerID_t mNDEFTimerId; static bool boNDEFState = FALSE; #endif‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Add the declaration of the timer callback function in Private functions prototypes of hid_device.c /************************************************************************************ ************************************************************************************* * Private functions prototypes ************************************************************************************* ************************************************************************************/ ... #ifdef NTAG_I2C static void NDEFTimerCallback(void *); #endif‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Allocate / Initialize the timer There are 3 timers used within the HID_device demo application. The NDEF timer is also necessary to allocate in the function BleApp_Config() in the hid_device.c file, at the same place as the common timers are allocated. Function TMR_AllocateTimer() returns timer ID value which is stored in the variable mNDEFTimerId. The timer ID allocation must be added behind the other timer as it is done at following C-code printout /* Allocate application timers */ mAdvTimerId = TMR_AllocateTimer(); mHidDemoTimerId = TMR_AllocateTimer(); mBatteryMeasurementTimerId = TMR_AllocateTimer(); #ifdef NTAG_I2C mNDEFTimerId = TMR_AllocateTimer(); #endif‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Add the timer callback function It is necessary to add the NDEFTimerCallback() function at the end of the hid_device.c file. If NDEF timer counter expires timer is stopped. Then RGB LED is switched off. There is the printout of the call back function at the following lines. #ifdef NTAG_I2C /*! ********************************************************************************* * \brief Handles timer callback for writing NDEF messages * * \param[in] pParam Calback parameters. ********************************************************************************** */ static void NDEFTimerCallback(void * pParam) { /* Stop Advertising Timer*/ TMR_StopTimer(mNDEFTimerId); /* switch off the LED indication */ TurnOffLeds(); } #endif // NTAG_I2C‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Note: Change the size for timer task  in app_preinclude.h file as follows: /* Defines Size for Timer Task*/ #ifdef NTAG_I2C #define gTmrTaskStackSize_c 1024 // changed for the NTAG integration #else #define gTmrTaskStackSize_c 500 #endif‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Security change The sample project for adding NTAG I2C middleware is hid_device and is described in chapter 3.1.1. This project requires to enter the password “999999” during the Bluetooth pairing. From this reason is necessary to decrease the security level to remove the password sequence. Security level is a part of the configuration and is set in the app_config.c file. In this file following parameter must be changed gSecurityMode_1_Level_3_c to the new parameter: gSecurityMode_1_Level_1_c Parameter gSecurityMode_1_Level_3_c is used on several places within the app_config.c file. Use the FIND function (short key is “CTRL+F”) of the IDE to find it and update. There are last two parameters of the gPairingParameters structure which are necessary to change. parameter: .securityModeAndLevel = gSecurityMode_1_Level_3_c, has to be changed to: .securityModeAndLevel = gSecurityMode_1_Level_1_c, parameter: .localIoCapabilities = gIoDisplayOnly_c, has to be changed to: .localIoCapabilities = gIoNone_c, parameter .leSecureConnectionSupported = TRUE, has to be changed to: .leSecureConnectionSupported = FALSE, Symbols Add the following symbols to project settings -> Preprocessor. The ones in red are for integration of ntag_i2c_plus middleware and the one in green is for adding the NDEF library, please see below: Include paths Please add the following includes in project settings. The ones in red are for NTAG I²C Plus middleware and the ones in green for the NDEF Library, please see below: With the previous setup it shall be able to run Bluetooth pairing example as for FRDM-KW41Z. Hope this  helps!
View full article
Hello NFC Community! This document demonstrates that multiple records can be also read from a Tag with TagXplorer. Please follow the steps below. Let's begin... Please make sure that you have written more than on record with NXP TagWriter app. For a more detailed explanation on this, please refer to the following document: Writing multiple NDEF text records with TagWrite app  The app can be found and downloaded from the Play Store: NFC TagWriter by NXP - Apps on Google Play  -> Connect the reader in TagXplorer -> Place the card on the reader and press Connect Tag -> Check for NDEF (1) and then, read NDEF (2). The Text Records can be visualized in the NDEF Payload Info below: I hope this is of great help! Ivan R.
View full article
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 
View full article
Hello NFC Community,   This document focuses to the configuration of the LPC8N04 to be controlled by the data it receives though the NFC interface. The document is based on the nfc_eeprom project of LPC8N04’s SDK. It will basically be necessary to modify the code within while(1) loop as below.   Get the data from NFC and store it on d_Data buffer:             if (NDEFT2T_GetMessage(g_NdefInstance, g_Data, sizeof(g_Data))) { /* Save NDEF Data into EEPROM */ //Chip_EEPROM_Write(LPC_EEPROM, 0, g_Data, sizeof(g_Data)); }‍‍‍‍‍‍‍ Clear respective semaphore and Flag: /** Clear Memory Write Semaphore */ releaseMemSemaphore(); /** Clear Write Flag */ g_TargetWritten = 0;‍‍‍‍‍‍‍   Now that the information is in the g_Data buffer now you may proceed to verify the received data with the one expected to trigger a function e.g., to turn on/off a led.   if(g_Data[7] == 'A') { Led_Set(true); } else if(g_Data[7] == 'B') { Led_Set(false); }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍     On the other side, it will only be necessary to approach the reader to the LPC8N04's antenna and the NDEFT2T_GetMessage(g_NdefInstance, g_Data, sizeof(g_Data)) function will get the data and store it on the g_data buffer mentioned above. Happy development! BR, Ivan.
View full article
NXP Reader Library is a software written in C language enabling the customers to create their own software stack for their contactless reader. The reader library supports the reader frontend ICs namely PN5180, CLRC663, PN5190 and reader NFC controllers namely PN7462AU, PN7640.   This document describes the structure on NFC reader library. After that, two examples are given on how to modify the software to match read and write NDEF messages. The description is based on NXP NFC Reader Library version 07.09.00, on PNEV7642A board.   1  NFC reader library introduction   NXP Reader Library is classified into following layer, each layer is independent from the other layers, each layer is used as an entry point for immediate upper layer.   Application layer (AL) Protocol abstraction layer (PAL) Hardware abstraction layer (HAL) Bus abstraction layer (BAL)      Below is a full picture of the NFC reader library      The reader library source code structure is as below picture shows,     Comps – components, source files of all included components (abstraction layers) Intfs  - interfaces .  header files of all included components. Types  - Types.   Global macros for general use as well as configuration.    1.1 Application layer (AL) This layer contains application specific implementations for various contactless cards, includes MIFARE DESFire, MIFARE DESFIRE EV2, MIFARE Plus, MIFARE Plus EV1, MIFARE Classic etc.       The application layer contains four main packages: -Card command sets and the NFC Forum Tag Type Operations ---MIFARE Classic Ultralight, DESFire, Felica, Jewel, ICode ---phalTop provides an API to complete NDEF related operations on top of the four NFC Forum Type Tags -NFC Activity: ---Discovery Loop -Host Card Emulation: ---Type 4A Tag -P2P Package: ---LLCP ---SNEP   1.2 Protocol abstraction layer (PAL) The protocol abstraction layer implements the activation and exchange operations regarding the protocol of the contactless communication. The NXP Reader Library supports following ISO standards protocols ISO/IEC14443-3A, ISO/IEC1443-3B, ISO/IEC14443-4, ISO/IEC14443-4A, MIFARE, ISO/IEC15693, ISO18000-3M1, ISO/IEC18000-3M3, ISO/IEC18092, Felica,     1.3 Hardware abstraction layer (HAL) The hardware abstraction layer implements the hardware specific elements of the reader chip, and abstract them to a generic interface.       1.4 Bus abstraction layer (BAL) The bus abstraction layer ensures correct communication interface between the master device and the reader chip, includes SPI, I2C, I3C, UART…   2 Reader Library customization   2.1  port to other MCU Layer structure of the NXP Reader Library is modular and multi-layered architecture.  If you want to port the reader library to other MCU, what you need to do is change the phDriver. phDriver is the abstraction of the board, of the MCU.     phDriver includes GPIO, Timer Abstraction Layer and BAL (Bus Abstraction Layer).   GPIO: it is for IRQ, Reset or other control signals. Timer: it is crucial for any timing relevant tasks, RTOS user timers, they care about everything, so porting timers is very important. BAL: interface between MCU and NFC Front-End (SPI, I2C, I3C, UART…),  we have to initialize SPI or I2C.     2.2 Read NDEF handling Exercise 1: Read the NDEF message of your ICODE DNA tag Process: check if the found Tag is technology V config the TOP AL to T5T check if a NDEF container is present check if I can read the message read the NDEF message please see the attached source code for more details   2.3 write NDEF handling Exercise 2: Write the same message onto one MIFARE DESFire tag. Process: 1 check if the found tag is Type-A 2 check if it is a T4AT by masking the SAK 3 set TOP AL config to T4T 4 check if it is NDEF formatted 5 write NDEF message      
View full article
https://community.nxp.com/docs/DOC-340244 
View full article
MIFARE DESFire Light read and write demonstration
View full article
The NXPNCI-KDS_Example for the PN7120/PN7150 Arduino interface boards available in NXP webpage at the time of publishing this document includes a project compatible with KSDK v2.0 for FRDM-K64F platform. With the latest KSDK v2.1 some changes in the drivers along with the later FreeRTOS v9.0.0 make the build process fail when following the instructions in the application note AN11845 NXP NCI KDS Example due to incompatibilities. Meanwhile until the project in NXP webpage is updated there is a temporary project attached to this document fixed to work with KSDK v2.1. The steps to build this project are the same as explained in the appnote, summarized below: - Download and install KSDK v2.1 for FRDM-K64F using MCUXpresso SDK online builder: Welcome to MCUXpresso | MCUXpresso Config Tools  Create a new workspace in KDS IDE. Import the "NXPNCI-KDS_Example_KSDK2.1" project from the archive file. Update the PROJECT_KSDK_PATH build variable according to the installation path of KSDK v2.1. Build the project. For more details please refer to the application note AN11845. Regards! Jorge Gonzalez
View full article
https://community.nxp.com/docs/DOC-340389 
View full article
DISCLAIMER APPLICABLE TO THIS DOCUMENT CONTENTS:   PN5190-NTAG 5 boost High Speed Communication Demo This article describes the unique feature of these two chips when interacting with each other at contactless interface: Passthrough demonstrator at high bit rates for ISO 15693 between PN5190 and NTAG5 Boost. Scope of demonstrator: ▪ Demonstrating a unique feature of NXP Semiconductors. High bit rates for ISO15693 communication (212 kbps) between a PN5190 reader IC and an NTAG5 boost plus LPC55S69 host MCU, when implementing passthrough mode using the SRAM of the NTAG5 boost. ▪ Through MCUXpresso console, the user can configure the contactless bit rate (26.4kbps or 212kbps options) as well as the amount of data to exchange using passthrough mode. ▪ Passthrough mode is implemented from NFC reader to LPC side only. ▪ The PN5190 prints on the MCUXpresso console the outcome of the transaction and baud rate achieved. ▪ In order to handle passthrough communication, we are using GPIO interrupt handlers on the NTAG 5 boost + LPC55S69 side and hard coded timeout on the PN5190 + MCU side. Required hardware and software material: Hardware ▪ PNEV5190BP development board ▪ LPCXpresso55S69 Development Board ▪ OM2NTA5332 - NTAG5 boost development kit ▪ 3 x USB micro cables Software ▪ Firmware Source Code for PN5190is attached to this article, containing keywork pn5190: mobileknowledge-nxp-connected-tags-pn5190-2cfb4c59b56e_v1.0.zip ▪ SDK_2.x_FRDM-K82F is already included in bundle mentioned above. ▪ Firmware Source Code for LPCXpresso55S69 is attached to this article, containing keyword lpc55s69: mobileknowledge-nxp-connected-tags-lpc55s69-5f2f9667cc60_v1.1.zip ▪ MCUXpresso IDE recent version (v11.6.0 or newer) Demonstrator bring up: Hardware assembly for LPCXpresso55S69: • Connect NTAG5 Boost board to LPCXpresso55S69 • Make sure SW6 is on position 2-3 to enable 5V power on tag side. • Connect LPCXpresso55S69 board to your computer (Debug Link Input). • No additional power source is needed. Hardware assembly for PNEV5190B: • Connect two USB micro cables to PNEV5190B board for power, flashing firmware and UART connection • Red LED indicates power is enabled • Green LED debugging/UART status Software loading on LPC55S69: Import “lpcxpresso55s69_ntag5_passthrough_nolib” project to MCUXpresso IDE • Install SDK_2_12_0_LPCXpresso55S69. SDK can be downloaded from • https://www.nxp.com/security/login?service=https%3A%2F%2Fmcuxpresso.nxp.com%2Flogin%2F  • Build project and flash a binary file using GUI Flash Tool. After flashing, reboot your board. Blue LED must be enabled which means tag is waiting for field to be detected. Under MCUXpresso: 1. Import project from file system 2. Select lpcxpresso55s69 project 3. Uncheck copy projects into workspace Software loading on PNEV5190B: • Unzip the “PN5190_NTAG5boost_Passthrough.zip” folder. • Import all projects inside “PN5190_NTAG5boost_Passthrough” to MCUXpresso IDE • Install SDK_2.x_FRDM-K82F. Such SDK is included in project file tree: • nxp-connected-tags-pn5190\Platform\SDK_2.x_FRDM-K82F • Build project and flash a binary file using GUI Flash Tool. After flashing, reboot your board. Blue LED must be enabled which means reader is waiting for NTAG5 to be detected. • Start Debug session to see available bitrate options on the console. Under MCUXpresso: 1. Import project from file system 2. Select all the projects 3. Uncheck copy projects into workspace LED User Interface Specifications (same for LPCXpresso55S69 an PNEV5190B) • Steady blue - waiting for Tag - discovery loop, • Blinking green - passthrough transfer ongoing • Steady green - all data transferred successfully. • Steady red - error - tag lost during transfer. Menu options when two boards have NFC antennas facing each other: Two options of bitrate are available for transfer amount of data from host to NTAG5 Boost: ▪  standard 26.4 kbps or ▪  highest bit rate 212 kbps It is possible to configure amount of data to be exchanged between PN5190 and NTAG 5 boost: ▪1KByte ▪2KBytes ▪10KBytes Demonstration flow: Once one of these option is selected, reader is ready to detect a tag. ▪ When tag is detected, reader configures selected bitrate and starts data exchange. ▪ Blinking green LED indicates transfer ongoing and the console shows a progress. Here are some results of transaction at the different bit rates and data sizes offered by this demonstrator: Data Size (Bytes) Selected bitrate (kbps) Result Bitrate (kbps) Transfer time (ms) 1024 26.4 2.8 357 1024 212 12.35 81 2048 26.4 2.8 714 2048 212 12.42 161 10240 26.4 2.7 3569 10240 212 12.41 806   High speed demo user manual can be also find attached to this article: 22-10-11 NXP - Connected Tags demonstrator User Manual.pdf Conclusions: This demonstrator HW & SW can show that high speed interaction can be achieved between PN5190 (NFC Front end) and NTAG 5 boost, making use of available commands described in product support package. Disclaimer: All SW available here is aimed only for evaluation purposes and NXP disclaims any direct or indirect liability damages, since referred SW bundles are not official part of PN5190/NTAG 5 boost standard product support packages available in nxp.com.  
View full article
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
View full article
This porting guide is for FRDM-K82F, and it can also be used for any other platform supported by KSDK 2.2. The released NXPNCI-KDS_Example_KSDK2.2 is based on FRDM-K64F, so before porting, we need to configure and download KSDK 2.2 for FRDM-K82F. Please make sure you have selected Kinetis Design Studio before downloading. After downloading, extract the package to some folder like below: and change PROJECT_KSDK_PATH to this folder: Change project settings as below: Remove all files in the folder of drivers, and import new source files as below: and similar procedure for "startup" folder and "utilities" folder: Replace the source files in board folder with the files from some ksdk demo like hello_world: FRDM-K82F uses PTC3 for NCI_IRQ pin, PTC9 for NCI_VEN pin, and PTA1 and PTA2(I2C3) as the I2C interface. so add definition in board.c and modify BOARD_InitPins() as below: Change linker settings: -Build -Debug settings -Test Result:
View full article
How to set the RF Settings can be found in -> https://www.nxp.com/docs/en/application-note/AN13218.pdf The list of the default values + values which shall not be changed is available in the attachment. 
View full article
The PN5180 offers a low-power card detection (LPCD) feature, which allows to power down the reader for a certain period of time to safe the energy. After this time the reader must become active again to poll for the cards. If no card has been detected, the reader can go back to the power down state. PN5180 LPCD cycle time includes standby time and VBAT time. In a normal case, standby time is 200ms (user can define it),   standby current is 15uA, VBATON current is 7500uA, FieldON current: 200mA.  Average current is about 200uA, it depends on your settings and application.   This article describes how to configure PN5180 LPCD using NXP Cockpit Tool and using NXP NFC Reader library.   1  PN5190 LPCD Overview PN5180 LPCD operates in two modes: auto calibration mode and self-calibration mode. Auto calibration mode:  everything done automatically Self-calibration mode:   calibration must be done manually before starting the LPCD.   1.1  Auto Calibration Mode ( 00b) The LPCD calibration is done automatically when the LPCD is started, using the gear and threshold as defined in the EEPROM. This mode always uses the same gear for the LPCD, and is the fast and easiest way to start the LPCD.  It is recommended to choose a gear, which always keeps the ITVDD and field strength limits, so normally, the highest gear number. Auto calibration mode is most commonly used, it is a standard use case. Below parameters need to be configured correctly in EEPROM   LPCD_REFERENCE_VALUE       LPCD_REFVAL_GPO_CONTROL      LPCD_THRESHHOLD  ( 0x37) LPCD wakes up, if current AGC during “ping” > AGC Reference + LPCD_THRESHOLD or< AGC Reference -LPCD_THRESHOLD Minimum LPCD_THRESHOLD = 03…08 (very sensitive) Maximum LPCD_THRESHOLD = 40 … 50 (very robust)    LPCD_FIELD_ON_TIME  (0x36) RF on time in 8µs, excluding the fix time .   Fix time = 62µs 01 => RF on = 70µs 02 => RF on = 78µs 03 => RF on = 86µs 10 => RF on = 190µs   1.2  Self Calibration Mode (01b) The LPCD calibration must be manually triggered, with reading or writing into the AGCREF_CONFIG register.   Reading from this register - without prior writing - starts an LPCD calibration. The calibration is executed using the gear which is resulting from the actual DPC setting under the actual antenna detuning condition. AGC_GEAR is used in the LPCD self-calibration.   Reading from this register - without prior writing - delivers in addition to the AGC_GEAR value the AGC_VALUE. The AGC_VALUE is used in the LPCD self-calibration. Writing to this register: Writing data to this register is required before starting the LPCD in Self-calibration mode. Either the previously read AGC_GEAR or a user-defined gear can be chosen. The previously read AGC_VALUE has to be written in any case. Writing data to this register defines the values for AGC_GEAR without taking the actual detuning condition into account. The value of AGC_GEAR to perform an LPCD calibration which derives the AGC_VALUE. This AGC_VALUE and the AGC_GEAR are used in the LPCD self-calibration.   Self-calibration mode always requires a Read AGC_REF_CONFIG, followed by a write AGC_REF_CONFIG, using the previously read AGC_VALUE.   The LPCD calibration can be done in two different options: Option 1:  Read AGC_REF_CONFIG register:  This command executes a standard RF Field on. So depending on the load condition the DPC adjusts the output power. The final gear is take as gear for the LPCD.  This option guarantees that the maximum output power is taken for the LPCD.   Option 2: Write AGC_REF_CONFIG register: This command executes a LPCD calibration ping with the gear number, as defined in the AGC_REF_CONFIG, bit 10:13. This option allows a flexible use of any of the defined gears for the LPCD.   PN5180 LPCD self-calibrate is executed, using Gear -> AGC_REF_CONFIG (Register) Threshold -> LPCD_THRESHOLD (EEPROM) RF on time-> LPCD_FIELD_ON_TIME (EEPROM)   2  How to configure PN5180 LPCD with Cockpit The NFC Cockpit allows the configuration and test of the low power card detection of the PN5180 as shown in below picture. The LPCD parameter, which are stored in the EEPROM, can be changed and the LPCD can be started. The LPCD tab allows to directly define and write the related EEPROM addresses:   LPCD Gear #: Defines the gear number, which is used for the LPCD in auto calibration mode, stored in addr. 0x34, bit 0:3 Threshold Value: Defines the threshold window, As soon as the AGC value during the LPCD ping exceeds the AGC reference value + threshold window, the IRQ will be raised and the PN5180 wakes up. Field On Time:  Defines the ping length Standby time :  This value defines the time between two pings in ms. FieldOn Current: This value is ITVDD under the loading condition, when RF field is on with the used gear. This value does not have any influence on the LPCD execution, but simply is used to estimate the overall  average current consumption. This current estimation is calculated, when the LPCD is started.         3   How to configure PN5180 LPCD with NXP NFC reader library. The LPCD works in two phases: First the standby phase is controlled by the wake-up counter (timing defined in the instruction), which defines the duration of the standby of the PN5180. Second phase is the detection-phase. The RF field is switched on for a defined time (EEPROM configuration) and then the AGC value is compared to a reference value.   Below is the flow chart for PN5180 LPCD          
View full article
  NXP offers FW update code as part of the SW6705.   PN7160 is typically delivered with the initial FW 12.50.05. To ensure full reliable functionality, it is highly recommended to update the FW on 12.50.09 (or latest). The FW update might be also helpful if you need to restore the default EEPROM settings.  The FW source data are inside the sFWudpate folder.  phDnldNfc_UpdateSeq.c -> FW Version 12.50.05 phDnldNfc_UpdateSeq_12_50_09.c -> FW Version 12.50.09 The phDnldNfc_UpdateSeq.c is executed, which means what is inside of this "C" file is pushed to the PN7160 EEPROM.  So, if you want to update from 12.50.05 to 12.50.09. You need to copy content from phDnldNfc_UpdateSeq_12_50_09.c to The phDnldNfc_UpdateSeq.c.  Also, make sure that the content in phDnldNfc_UpdateSeq_12_50_09.c is commended.   Once that's done, you can debug the code.  Then you can check the progress in "Terminal"   
View full article
Extended NFC Factory Test Application includes:  Get Current value (current measurement in mA) DPC Check (Available from FW. Version 12.50.06) Get AGC Value  Get AGC Value NFCLD (AGC value reading with fixed NFC Level Detector level)   How to get it:  Just download the app from Github. Replace the "NfcFactoryTestApp.c" with the file which is here in the attachment.  Run the application as described in ->AN13287.
View full article