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
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&appType=license&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
View full article
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
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 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.
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
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
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.  Tomas Parizek  Customer Application Support 
View full article
  NXP offers FW update code as part of the SW6705.   All PN7160 FW versions including ".c" files are available on PN7160 Github.    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"    Tomas Parizek  Customer Application Support 
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
https://community.nxp.com/docs/DOC-340244 
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
MIFARE DESFire Light read and write demonstration
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
There is a basic GUI for PN7160 RF Settings available.
View full article
https://community.nxp.com/docs/DOC-340389 
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
Introduction NTAG5 offers a powerful energy harvesting feature (up to 30mW). One useful application can be charging the supercapacitor which then might be used as the supply of customer MCU, Sensor, etc.   See the typical schematic below:  C1 and C1P are used for the impedance tuning. The antenna is typically tuned at 13.56 MHz-14MHz.  R1 is used to limit the charging current of the supercapacitor. Its value depends on the selected VOUT voltage, keep in mind that the maximum output current is 12.5 mA.  E.g. VOUT=2.4V, Icharging=10mA -> R1=240 Ohm Keep in mind, that if the charging current is too high and/or the amount of the received magnetic field is not high enough, the VOUT may drop.  D1 should be a low-drop diode e.g. RB520CS30L Used super cap: CPX3225A752D Antenna size  Generally, it is best to attempt to match the tag and the reader antenna geometries for maximum efficiency. A significant difference between the reader and tag antenna dimensions result in bad communication and energy harvesting performance because of the small coupling factor. As smartphone NFC antennas can have different dimensions. It might be challenging to design one NFC Tag antenna that will deliver the best performance for multiple smartphones.  The phone's NFC Antenna dimensions are typically between approximately 25 mm vs 20 mm (NFC Forum Poller Class 6) & 50 mm vs 30 mm (NFC Forum Poller Class 3). Note: But this might be different e.g., iPhones  So customers can consider the following form factors of NFC antennas for their Energy harvesting NTAG5 Link design:  For bigger designs (NFC Forum Listener Class 3):    For circle NFC Antenna ->Outer diameter is approx. 44 mm    For smaller designs (NFC Forum Listener Class 6):  For circle NFC Antenna ->Outer diameter is approx. 25 mm     Tomas Parizek  Customer Application Support 
View full article