NXP Designs Knowledge Base

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

NXP Designs Knowledge Base

Discussions

Sort by:
Description    NXP’s Personal Network Attached Storage (NAS) solution enables portable personal storage to be shared through an internal protocol (IP) or Wireless network allowing users to share photos, data, stream music or videos, backup and recovery of data over the local area network in a completely secure environment. In addition, the solution can support gateway features such as packet forwarding, cloud connectivity via Ethernet, Wi-Fi or LTE. This NAS solution offers significant advantages to consumer and SMB environments, including: Hardware-accelerated Raid for data parity and recovery, a reduced bill of materials (BOM) and ease-of-use associated with an IP network that most business and consumers already find familiar. Based on the QorIQ Layerscape LS1012A processor and the Network Attached Storage Application Solution Kit (ASK), the personal/consumer NAS solution offered by NXP allows developers to easily build storage applications leveraging the highly-optimized and feature rich ASK software stack along with the small form factor, low-power consumption and packet processing capabilities enabled by LS1012A processor. NXP provides an integrated platform solution (SW and HW) helping the customer to reduce his time to market, increase security and increase performance by leveraging the packet accelerators within the QorIQ® Layerscape LS1012A processor while delivering high NAS performance and IP forwarding applications with reduced load on the Arm® core. In addition, NXP LS1012ARDB supports a full set of popular interfaces such as SATA, USB 3.0, PCIe and 2.5/1Gigabit Ethernet for LAN and WAN, allowing customers and operators to securely connect storage devices with the cloud. Features Integrated Platform Solution Commercial Market Proven Software Solution Hardware Offloading Popular Connectivity Flexible and Optimized Software Architecture Use Cases Personal Storage Consumer Network Attached Storage (NAS) Consumer Direct Attached Storage (DAS) Battery Powered Portable NAS Wireless Personal Storage Media Gateway Chip on Drive Wi-Fi SSD and Small/Portable Drive Ethernet Drives Block Diagram Products Category Name MPU Product URL Layerscape LS1012A Communication Processor for the IoT | NXP  Product Description The QorIQ® LS1012A processor, optimized for battery-backed or USB-powered, space-constrained networking and IoT applications Category Name DC Regulator Product URL MC34VR500 | Multi-Output DC/DC Regulator | NXP  Product Description The NXP® MC34VR500 power management solution for network processor systems is a high-efficiency, quad buck regulator with up to 4.5 A output and five user-programmable LDOs. Tools Product URL QorIQ® LS1012A Development Board QorIQ® LS1012A Development Board | NXP  Layerscape FRWY-LS1012A board FRWY-LS1012A Development Platform | NXP 
View full article
Description Earlier this year NXP organized a promotional opportunity for amateur radio enthusiasts to use their creativity and build their own power amplifier designs. NXP received numerous creative submissions in this competitive Homebrew RF Design Challenge. We appreciate the dedication and enthusiasm from the community that made this contest a success. First place winner An MRF101AN broadband amplifier design with 1 W Input, 100 W Output 1.8-54 MHZ Amplifier deck. (For more information visit:NXP MRF-101 - RFPowerTools )  It is an amplifier with a bandwidth of 1.8MHz to 54MHz. Maximum output power of 100W up to 30MHz and 70W up to 50MHz. Maximum power supply 50V to 4A, with a Voltage Standing Wave Ratio of 1.5:1 maximum. The design dimensions of the PCB is 5x5 cm (2x2 in). and 310g weight including fan and heat sink. Second place winner A 600W broadband HF amplifier using affordable LDMOS devices (For more information visit: https://qrpblog.com/2019/10/a-600w-broadband-hf-amplifier-using-affordable-ldmos-devices/  ) This project is meant to demonstrate the capabilities of the MRF300 transistors as linear broadband devices in the 2-50MHz range and to be used by radio amateurs as a starting point for a medium-high power amplifier. This is also my entry to the NXP Homebrew RF Design Challenge 2019. To achieve the target of 600W output while also minimizing the level of even-number harmonics, a “push-pull” configuration of two transistors is used. Luckily, the manufacturer made it easy to design the PCB layout for such a thing by offering two versions (the MRF300AN & MRF300BN) that have mirrored pinout. The common TO-247 package is used, with the source connected to the tab. Each individual MRF300 LDMOS transistor is specified at 330W output over a 1.8-250MHz working frequency range, a maximum 28dB of gain and over 70% efficiency. The recommended supply range is 30-50Vdc. By studying the specifications, it looks like with correct broadband matching and some operational safety margin we can get close to 600W output at a voltage of around 45V across a resonably large bandwidth; the aim is to cover 1.8 to 54MHz. Main challenges when designing this amplifier are related to achieving good input and output matching over the entire frequency range as well as maintaining high and flat gain. Good linearity and a low level of harmonic products are mandatory. As the TO-247 is not a package specifically designed for high-power RF, there are some challenges with thermal design and PCB layout as well. Information taken from the essay by the winner. Third place winner A High Efficiency Switchmode RF Amplifier using a MRF101AN LDMOS Device for a CubeSat Plasma Thruster (For more information visit: Research - SuperLab@Stanford ) The Class E amplifier utilizes the active device as a switch, operating in only cutoff (off) and saturated (on) conditions. This minimizes the overlap of voltage and current, reducing losses in the active device. To further reduce loss the Class E amplifier utilizes an inductively tuned resonant network to achieve zero voltage switching, bringing the voltage across the switch to zero before turn on, eliminating energy stored in the output capacitance of the active device that would otherwise be dissipated. This is achieved with an inductively tuned series resonant output filter.  In the Class E amplifier losses are almost entirely determined by the current conducted by the active device so a high drain impedance is desired to maximize efficiency. The drain impedance is ultimately limited by the voltage rating of the switch. For our desired output power of 40W and the maximum voltage rating of 133V for the MRF101AN this impedance is still less than 50 ohms, so a L match circuit is used to match the drain impedance to 50 ohms. The load network in our design provides a drain impedance of 15.4+12.8j. As the MRF101AN will operate in saturation a high drive level is desired. To eliminate the need for a preamplifier and allow for digital control, we use a high speed gate drive chip typically used in switch-mode power supplies, LMG1020, to drive the MRF101AN instead of a RF preamplifier. A resonant network is used to provide voltage gain at the fundamental and third harmonic, providing a quasi-square wave on the gate which helps insure the device remains in saturation. Conclusion It was a close call and highly competitive! Each participant had their own creative, unique and impressive way of displaying the capabilities of these new parts. NXP is always up for new design challenges. Ready for the next challenge?
View full article
Description Near Field Communication (NFC) is used for real-time precision marketing based on time, local inventory and the individual when embedded in product displays or the products themselves. NFC is also becoming the preferred method for payment either in smartphones or smart payment cards. NXP secure MCUs and MPUs paired with our contact and contactless readers provide customers with state-of-the-art, comprehensive, pre-certified PCI and EMVCo payment acceptance capabilities that will ease the development process and speed time to market for payment solutions. SmartPOS will be the most important POS in the future. Customers can download authorized third-party software and connect to an acquiring system via cellular communication. It has both the security of traditional POS and the convenience of mPOS. Features Contact card interface (TDA8035) and contactless card interface (CLRC663) Supports the whole system to pass EMV Level 1/2 certification Magnetic Strip Card Reader (MSR) supports 1/2/3 tracker, which could be implemented by ADC module Tamper detection with more active pin pairs Integrated encryption module/accelerator High speed SPI interface to extend memory space Secure boot Code protection USB/UART/SPI communication ports, etc. Block Diagram Products Category Name 1 MCU and MPU Product URL 1 Arm Cortex-M4|Kinetis K21 120 MHz 32-bit USB MCUs | NXP  Product Description 1 The Kinetis K21 MCU features a hardware encryption coprocessor for secure data transfer and storage. Faster than software implementations and with minimal CPU loading. Supports a wide variety of algorithms - DES, 3DES, AES, MD5, SHA-1, SHA-256 Product URL 2 i.MX RT1170 Crossover MCU Family - First Ghz MCU with Arm® Cortex®-M7 and Cortex-M4 Cores | NXP  Product Description 2 i.MX RT1170 includes NXP’s EdgeLock™ 4A security subsystem, including secure boot and crypto engines Category Name 2 Card Reader Product URL 1 High integrated and low power smart card interface | NXP  Product Description 1 The TDA8035 is the cost efficient successor of the established integrated contact smart card reader IC TDA8024. It offers a high level of security for the card by performing current limitation, short-circuit detection, ESD protection as well as supply supervision. Product URL 2 CLRC663 plus | High-performance multi-protocol NFC frontend | NXP  Product Description 2 The CLRC663 plus is a high-performance NFC Frontend with low-power consumption. Is the perfect choice for NFC applications with high-performance requirements like access control, payment, gaming. Category Name 3 RTC Product URL 1 PCF2129 | NXP  Product Description 1 The PCF2129 is a CMOS Real Time Clock (RTC) and calendar with an integrated Temperature Compensated Crystal (Xtal) Oscillator (TCXO) and a 32.768 kHz quartz crystal optimized for very high accuracy and very low power consumption. Designs Products Links Linux Point of Sale (POS) Reader https://www.nxp.com/design/designs/linux-point-of-sale-pos-reader:SLN-POS-LRDR 
View full article
Description The user interface of a product is a key element that design engineers need to address to provide a compelling user experience. Touchpads, slides and rotaries offer a more intuitive and effective way of user interaction than traditional buttons. And, designing a touch-based user interface is simplified with this NXP touch solution. The touch function is more and more popular in the consumer market, especially in the white-good field. The KE15Z series of MCUs offers the Touch Sensing Interface (TSI) which recognizes finger touch by sensing capacitance changes. Features Advanced EMC robustness, pass IEC61000-4-6 standard test Supports both self-cap sensor and mutual-cap sensor, up to 36 touch keys Low BOM cost per touch key, no need for external devices Adjustable touch sensing resolution and sensitivity, high-performance for waterproof applications Low-power support Block Diagram Products Category Name 1: MCU Product URL 1 Arm Cortex-M0+|Kinetis KE1xZ 32-bit 5V MCUs with Touch Interface | NXP  Product Description 1 The KE1xZ includes a robust TSI module which provides a high level of stability and accuracy to any HMI system. These MCUs support up to 256 KB flash, 32 KB RAM, and a complete set of analog/digital features. Category Name 2: Wireless Product URL 1 Arm® Cortex®-M0+|Kinetis® KW41Z 2.4 GHz Bluetooth Low Energy Thread Zigbee Radio MCUs | NXP  Product Description 1 The KW41Z is an ideal solution for true single-chip designs that require concurrent communication on both a Bluetooth Low Energy network and an 802.15.4-based network such as Thread and Zigbee. Documentation KE15Z TSI Development for Low Power Applications:  https://www.nxp.com/docs/en/application-note/AN5420.pdf  Demos Touch Sense Interface for Kinetis KE15Z MCUs  Tools Product Link FRDM-KW41Z: Freedom Development Kit for Kinetis® KW41Z/31Z/21Z MCUs FRDM-KW41Z |Bluetooth Thread Zigbee enabled Freedom Development Kit | NXP  FRDM-TOUCH: Touch Module for Freedom Board FRDM-TOUCH|Touch Module for Freedom Board | NXP 
View full article
Description With the RF Cicuit Collection, NXP customer can browse, dowlnload and order through a large number of Reference Circuit documentation. Video Introduction to the RF Circuit Collection  Step by step Guide 1. Go to www.nxp.com/rfcollection. 2. Accept the click-through licence. 3. Browse across 400 reference circuits by frequency or power using the sorting tool or doing a direct search in the search engine 4. Depending on documentation availability, either download or request the desired documentation by clicking the corresponding button. 5. Do you need a board? Order it through our distributor partners by using the distributor button in the collection. Products NXP Product Link NXP RF Cicruit collection www.nxp.com/rfcollection 
View full article
Description In this demo we show how to create a zumo robot basic controller. For this we will use the FRDM-KW41 card, an H bridge, and a cell phone with the NXP IoT toolbox application. From the application we will send the characters F forward, S to stop, B to back, L to left, R to right. The FRDM-KW41Z highly-sensitive, optimized 2.4 GHz radio features a PCB F-antenna which can be bypassed to test via SMA connection, multiple power supply options, push/capacitive touch buttons, switches, LEDs and integrated sensors. Video Diagram and Schematic Step by Step guide First, we need to have MCUXpresso installed and open. Download and load the Zumo Robot project in MCUXpresso. Install NXP IoT Toolbox app. Compile the project, connect the board and load it. Connect the card as indicated in the schematic Connect the power supply. Press switch 4 on the board. Open NXP IoT Toolbox, select Wireles UART and connect with the board. Now you can send the characters mentioned in the description. NXP Product Link Freedom Development Kit for Kinetis® KW41Z/31Z/21Z MCUs FRDM-KW41Z |Bluetooth Thread Zigbee enabled Freedom Development Kit | NXP 
View full article
This demo shows how to load the different demo codes for the kit FRDM-K64 with FRDM-FXS-MULT2B boards, to access the different sensors included in the card and use it to create your own applications. This demo runs on a K64 freedom board and uses the MCUXpresso IDE, the FRDM-K64 with MULT2B SDK and a serial terminal, in this case TeraTerm. Video: Software Links: Driver FRDM-K64: http://developer.mbed.org/media/downloads/drivers/mbedWinSerial_16466.exe MCUXpresso (requires NXP account): https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE SDK Builder (requires NXP account): https://mcuxpresso.nxp.com/en/select_config_tools_data TeraTerm: https://osdn.net/projects/ttssh2/releases/ NXP Product Link Freedom Development Platform for Kinetis® K64, K63, and K24 MCUs FRDM-K64F Platform|Freedom Development Board|Kinetis MCUs | NXP  Freedom Development Platform for NXP® Sensors with Bluetooth®. Freedom Development Platform Bluetooth® | NXP 
View full article
Cellular Freedom Quickly move sensor data to the cloud using the FRDM-K64F End-Device certified Skywire cellular modems provide a path to production Complete mbed code provided This Demo Is Probably of Interest If You: Need a quick proof of concept Have to demonstrate cellular connectivity to a customer or client Don’t want to build your own Thing for your IoT demo Differentiation - This Demo Highlights End-Device certified modems require no Carrier certifications to use on the cellular network XBee R footprint makes your design futureproof Global options for devices deployed or moved anywhere in the world Description The NXP FRDM-K64F is the development board for the NXP Kinetis series, providing an affordable, flexible way to build prototypes. For applications requiring cellular connectivity, the NimbeLink Sensor Shield plugs into the FRDM-K64F development board and, in turn, accepts a plug-in NimbeLink Skywire end-device certified cellular modem, providing quick cellular access. This first-in-the-industry plug-in cellular solution is easier and more compact than USB or other modem connection options, and the pre-certified Skywire embedded modem eliminates the cost and complexity of obtaining carrier certifications. The NimbeLink shield comes with four integrated MEMS sensors for easy proof-of-concept development. Sensors include an accelerometer, a temperature sensor, an atmospheric pressure sensor, light sensor, a humidity sensor, an accelerometer and two pushbutton switches. The shield also provides headers similar to those on an Arduino board. These accept any of hundreds of compatible expansion boards allowing the addition of capabilities like GPS, screens, motor controllers, and more. The NimbeLink Sensor Shield requires 5-12vdc power and accepts a variety of antennas. Full Listing of Products/Components Note: For full listing or additional information for Products/Components used in this demo see "This Demo's IoT Highlights" in Left Column. Note: If you aren't looking at this demo in the IoT Solutions Center, please use below link to access NXP IoT Solutions Center: https://community.freescale.com/community/iot-center/demos/skywire-m2mmanager-demo What this Demo is All About Video Link : 4994 IoT Physical Components Gateways Boards/Modules: FRDM-K64F Software: ARM mbed End User Products: NimbeLink Sensor Shield and Skywire Modem Wireless Connectivity End-Device certified Skywire cellular modem Sensors MEMS accelerometer, temperature, humidity and pressure sensors. Light sensor, potentiometer and pushbutton switches. Cloud Infrastructure/Services Verizon ThingSpace IoT System Capabilities Cloud/App Communications/Interworking See the data from your Sensor Shield in the cloud using the Verizon ThingSpace portal on any connected device. IoT Development Capabilities Embedded Platforms NimbeLink can help you customize your cellular product design to take advantage of the latest NXP advances in technology. IoT Product Type Product/Component Vendor Research or Procure This Product/Component End User Hardware Skywire Sensor Shield Commercial Skywire Sensor Shield End User Hardware Skywire end-device certified cellular modem Commercial Skywire Modem
View full article
NXP Thread Commissioning Demo with Arrayent’s Cloud Control Thread devices can be monitored and controlled from anywhere in the world using Arrayent Connect Cloud Devices are easily commissioned onto a Thread network using NXP Thread App & QR code Devices are secure using Arrayent Unique ID (whitelisting) and AES-128 bit encryption. This Demo Is Probably of Interest If You: Want to monitor and control Thread devices that sit behind a consumer grade firewall from anywhere in the world. Want to commission Thread devices in a easy way. Differentiation This Demo Highlights Control and monitor Thread devices that sit behind a consumer grade firewall from anywhere in the world. Commission Thread devices using QR code Description The Thread network is managed by a LS1021A  IT Gateway with FRDM-KW24 Thread Border border reference design. The board supports Thread, Wi-Fi, BlueTooth and NFC too. NXP’s Thread commissioning android App discovers the Thread border router. NXP powered Thread “device” is a card with a NXP Kinetis® KW2xD 802.15.4 Wireless chip with an ARM Cortex M4 MCU board running the Thread protocol and the lightweight Arrayent Connect Agent. The Thread device boards are commissioned (or “paired”) on to the Thread network by using the NXP Thread commissioning Android App takes the device’s unique ID from the  QR code on the  device and pushes Thread network credentials into the device. This is shown again with a second card. Arrayent’s Connect Agent has been pre-loaded into the device boards.  And once the board is connected to the Thread network, the device board starts communicates directly to the Arrayent Cloud. Essentially key attributes on the board are presented up to the Arrayent Connect Cloud web services APIs. The final step is to use the Arrayent devkit app to monitor and control the device board from anywhere in the world.  In this case the we can demonstrate three monitor/control use cases: 1.     Turn on and off the device LED from the mobile app. 2.     Press a button three times to update the Apps button press counter (in this case three times.) 3.     Push the board temperature to the mobile app. What this Demo is All About Video Link : 5310 Find more information Press release: Read on The Business Journals Blog posts to read: NXP and Arrayent Collaborate to Connect Thread Devices at Embedded World, Nuremberg, Germany Thread-Enabled Smart Home Powered by Arrayent Demo Diagram IoT Physical Components Gateways SOC: NXP i.MX6 Applications Processor, NXP Kinetis®KW24D SoC Software: Embedded Linux, NXP Thread Stack for border router End User Products: LS1021A IT Gateway with FRDM-KW24 Thread Border border reference design Edge Devices SOC: NXP Kinetis®KW24D (802.15.4 Wireless chip with an ARM Cortex M4 MCU) Boards/Modules: NXP FRDM-KW24D  Development Board Software: Arrayent Connect Agent ported to the KW2xD, NXP Thread Stack for router end devices Wireless Connectivity SOC: NXP Kinetis®KW24D (802.15.4 Wireless chip with an ARM Cortex M4 MCU) Sensors SOC: KW24D On-chip Temperature, MMA8451Q 3-axis accelerometer Cloud Infrastructure/Services Software/Services: Arrayent Connect Cloud Smart Devices/Apps Software: Arrayent Android DevKit sample app and SDK Software: NXP Android Thread provisioning app IoT System Capabilities Device Management Each device is flashed at time of manufacturing a unique Arrayent Device ID and AES key.  The device ID is bound to a specific customer account at time of device commissioning. Cloud/App Communications/Interworking Arrayent devkit app talks to the Arrayent Connect Cloud’s device services interface through the Arrayent Connect Agent embedded software to connect to the device boards. The App is used to monitor and control the device board from anywhere in the world.  In this case the we can demonstrate three monitor/control use cases: Turn on and off the device LED from the mobile app. Press a button three times to update the Apps button press counter (in this case three times.) Push the board temperature to the mobile app. Security Arrayent uses device ID Whitelisting, that is Arrayent issued device ID is flashed into endpoint MCU memory at time of manufacturing.  The per device unique ID is reserved in the cloud. Arrayent ACA embedded agent and ACC cloud services support AES-128 bit end-to-end encryption with dynamic temporal key refresh. Analytics/Data The Arrayent Connect Cloud support IoT Product Type Product/Component Vendor Research or Procure This Product/Component End User Hardware USB Wireless Keyboard and Touchpad Commercial Logitech Wireless Touch Keyboard K400 with Built-in Multi-Touch Touchpad, Black End User Hardware Dell 22" HDMI Monitor Commercial Dell 22" Monitor End User Smart Device Motorola XT1032 Moto G Android Smart Phone Commercial Motorola Android Smart Phone End User Edge Device Xfinity XR2 Remote Control Unit Commercial Comcast Remote Control End User Edge Device Philips HUE Bulb ZigBee Lightlink (HA 1.2) Commercial Hue, Professional Wireless LED Lighting | Philips Lighting End User Edge Device CentraLite 3-Series Appliance Module (4257050-RZHAC) (Zigbee HA 1.2) Commercial SmartPlug End User Edge Device Axis 0301004 M1011-W camera (WiFi g) Commercial AXIS M1011-W Network Camera, a small wireless IP camera | Axis Communications End User Edge Device Maxxima Style Night Light w/ sensor Commercial Night Light End User Edge Device TP-LINK TL-MR3020 3G/4G Wireless N 150 Portable Router Commercial WiFi Router
View full article
Vital signs patient monitoring module using K60 Family MCU. Medical grade device, meets stringent safety / regulatory requirements Multi channel, real time data collection and processing:  Electrocardiogram, blood pressure, blood oxygenation etc. Usable as bed-side unit or part of distributed patient monitoring system This Project of Interest If You: Are interested in industrial medical products Are interested in real time analysis of live sensor data Description The module was developed as main functional part of portable patient monitor. It has a compact design, and unified serial interface to the host unit.  We developed it as a single board PC designed for main patient monitor application hosting and system purposes. The module provides comprehensive solution for patient vital signs monitoring. It has simplified connections, requiring only a power connection and a single data connection to the host or the distributed monitoring system. The design also meets the safety requirements for galvanic isolation of the patient. Kinetis K60 Family MCU was used as a core of this module, for data acquisition, signal preprocessing (digital filtration), data analysis and system tasks including extended supervisor functionality (with additional NIBP reserve/alarm system). The module has the following features: Module can be used in a bed-side unit, or part of a distributed monitoring system 7-lead electrocardiogram (ECG) (3-lead capable mode without RLD); Respiration rate (transimpedance on ECG lead I or lead II); SpO2 (oxygen saturation) using Nellcor OxiMax™ technology NIBP (noninvasive blood pressure) with patient adaptive fast measure mode for continuous monitoring, STAT mode; Body temperature, 2 channels Optional IBP (invasive blood pressure) up to 4 channels. This module meets all IEC safety requirements and is CE certified (as a part of patient monitor). Full Listing of Products/Components Protected by NDA IoT Physical Modules Sensors ECG / Respiration Blood oxygenation Blood pressure: invasive, non-invasive Body temperature Kinetis K60 MCU used for: Data acquisition Signal preprocessing and filtering Analysis, result output Supervisory functions Alarm generation IoT System Capabilities Under NDA
View full article
JN516x-EK004 ZigBee Smart Home Kit with NFC Commissioning All necessary hardware components to demonstrate, evaluate and develop ZigBee wireless network solutions with IoT connectivity and NFC commissioning Firmware pre-loaded with demonstration software for both ZigBee nodes and IoT Gateway Free support resources for developing ZigBee applications for the JN516x microcontrollers Expandable with the addition of extra ZigBee nodes, available separately             JN516x-EK004 Evaluation Kit                               NFC Controller on Raspberry Pi Board Physical Components The JN516x-EK004 ZigBee Smart Home Evaluation Kit includes the following hardware components: Gateway Component Raspberry Pi single-board computer to act as IoT Gateway Host JN5169 USB dongle (OM15020) to act as ZigBee Control Bridge Wi-Pi Raspberry Pi dongle for Wi-Fi connectivity NFC controller (PN7120) for NFC commissioning of ZigBee nodes ZigBee Node Components Carrier boards (OM15022) to accommodate expansion board and ZigBee JN5169 module, and incorporating NFC connected tag (NTAG I 2 C) including NFC antenna ZigBee modules (JN5169-001-T00/T01) providing processing platform and RF interface Generic expansion board (DR1199) with switch and level control functionality Lighting/Sensor expansion board (DR1175) with white light, colour light and sensor functionality Software Pre-loaded ZigBee Smart Home demonstration Flash programming utility for firmware re-programming Software Developer’s Kits (SDKs) for developing applications for JN516x microcontrollers Eclipse-based Integrated Development Environment (IDE) for easy application development Application Notes containing example applications and templates This Demo Is Probably of Interest If You: Work with Home Automation, Smart Energy or other similar IoT applications Need a state-of-the-art ZigBee solution Need a secure and convenient way to commission devices to your ZigBee network Key Benefits of Kit All-in-one kit to rapidly get started with your ZigBee application development Leverages NXP NFC solution to commission ‘smart nodes’ out of the box, securely and in just one tap Comprehensive support software and collateral for developing custom ZigBee solutions with IoT connectivity Video Link : 4980 JN516x-EK004 Evaluation Kit Leaflet JN516x-EK004 Evaluation Kit User Guide JN5169 ZigBee Wireless Microcontroller JN5169 USB Dongle for ZigBee (OM15020) ZigBee 3.0 Wireless Network Protocol ZigBee Generic Node Expansion Kit (JN5169XK010) ZigBee Lighting/Sensor Node Expansion Kit (JN5169XK020) NFC Controller (PN7120) NFC Connected Tags (NTAG I 2 C)
View full article
This post entry aims at explaining the debugging process oriented to EMVCo Contactless certification of a device integrating NXP's PN5180. The structure is the following: PN5180 Antenna design considerations Before going into the debugging process for the EMVCo Contactless Analog tests we will see some important considerations for an antenna design and impedance tuning oriented for an EMVCo compliant device. Antenna tuning recommendations The first recommendation is that with the Dynamic Power Control feature the PN5180 allows us to perform symmetrical antenna tuning instead of the typical asymmetrical tuning. This symmetrical tuning provides us with a better transfer function, being able to drive more power to the antenna. The following figure shows the Smith Chart with the S11 parameter plot of a device using a symmetrical antenna tuning:   The only disadvantage of the symmetrical tuning is that we need a current limiter to avoid destroying the chip because of exceeding the chip’s limits. In the case we are documenting today, the PN5180 DPC feature is used to limit the supply voltage and therefore the transmitter current depending on the load detected by the chip. Regarding the EMC filter, the inductor should fit with the following condition to guarantee a good relation between the AGC and the ITVDD: Another consideration is about the resistor used in the reception branch. This resistor controls the receiver sensibility and as a starting point is recommended to use a value to obtain an AGC in free air of: Reader Mode only design: AGC value in free air around 600dec Full NFC design: AGC value in free air around 300dec Finally, EMV contactless transactions are performed at 106kbps which would allow us to work with a high Q factor of the overall system. This means that the power gain can be higher, but at the same time it might also lead to some issues because of the lower bandwidth. In light of this, we have to bear in mind, that if the Q factor is too high it may lead to problems in the waveform tests. PN5180 DPC calibration The Dynamic Power Control is a feature that uses the AGC value to establish different power configurations depending on the load applied to the antenna. As I mentioned before, the main goal is to protect the chip from a transmitter current level that might destroy it. The first step before calibrating the DPC is to check the correlation between the AGC value and the transmitter current or ITVDD when different loads are applied to the antenna. Basically, we will play with the distance between the load and the device to get several points with different AGC values. Based on those measurements, we can plot a graph like the following: Normally we would use a reference PICC and a metal plane or phone to check that the behavior is linear and with no big difference between those loads. Once we have checked the correlation we can proceed with the calibration process, which can be done very easily with the NFC Cockpit software. Here the important thing is to control the ITVDD and keep it always below the chip’s limit. As you can see in the figure below, without the DPC, this symmetrical tuning would lead to a voltage above the limit for positions close to the reader antenna. However, with DPC we can control that voltage at any moment. Another consideration is that we have to make sure that the DPC is calibrated to have maximum power when the reference PICC is far from the reader to avoid a lack of power in the tests at those positions. EMV L1 Analog Tests Debugging process We are going to divide this debugging process into 3 main phases which are the power tests in the first instance, followed by the waveform tests and the reception tests. The reason why we set this order is to first debug the tests that may require HW modifications which have a strong impact on the other tests. This way, for example, if you have passed all power and waveform tests, debugging the reception tests may not have an impact on the results obtained previously. Power tests Tests setup In order to debug the power tests, we will need just an oscilloscope and an EMVCo reference PICC. We will need to connect the outputs J9 and J1 of the EMVCo reference PICC to the oscilloscope and set the jumper J8 of the reference PICC in non-linear load mode. The J9 of the EMVCo reference PICC is the DC_OUT output that we will use to measure the power received by the antenna. The J1 is the LETI_COIL_OUT output and we will use it to capture the command in the oscilloscope. The overall setup is depicted in the figure below. Performing tests We have to use the trigger to capture the REQA command sent from the DTE when the reference PICC is in the position we want to test. This capture can be seen in the two figures below. The yellow channel is the LETI_COIL_OUT of the EMVCo reference PICC and the blue channel represents the DC_OUT obtained from the J1 connector. As said previously, we will use the DC_OUT to measure the voltage in the period of the signal where there is no modulation, like this part highlighted with the red squared. We have zoomed into the period to get the average value using the oscilloscope measurement features. We will use this same procedure to evaluate the power tests in all positions. Depending on the position tested, the specifications define and certain range where the voltage measured should be fitted. In this sense, the maximum voltage level is common for all planes, but the minimum voltage allowed will decrease for positions further from the terminal.  In order to identify the critical positions for the power tests, we have to identify two different scenarios, the first one with the positions that might not reach the minimum voltage established, and the positions that might exceed the maximum value. For the first scenario the critical positions are the outer positions of the plane z = 4cm and the plane z=3cm as the external positions for plane z= 3cm have a bigger radius. The other scenario is that where you can be exceeding the maximum level. This situation can happen in the central positions of the lower planes, like plane z=1 or z=0. Debugging hints In order to overcome possible issues, we will give some tips that can be used for your design. Regarding a case of lack of power, first, we have to make sure that the DPC is correctly calibrated, meaning that you are operating in gear 0 for the external positions of planes 3 and 4 and that gear 0 is operating with full power. If we have verified those two things and we still have issues, we would need to change the tuning of the antenna and reduce the target impedance. This is graphically represented in the following Smith Chart: By reducing the impedance we increase the current that the PN5180 is driving to the antenna so the voltage would increase. Is important to always verify that we are working within the recommended operating range of the chip and that we are not exceeding the transmitter current limit. In a worst-case scenario, if we cannot achieve the voltage with these HW changes we would need to evaluate changes in the hardware design, like adding a ferrite sheet or changing the antenna dimensions or position. On the other hand, if the problem comes because we are exceeding the maximum voltage allowed by the specifications we can easily solve it by reducing the power configuration of the gear used in that specific position. Waveform tests Test setup For the waveform group of tests, we will use a setup consisting of the EMVCo reference PICC along with an oscilloscope and a PC software to evaluate the signal obtained from the oscilloscope. In our case, we will use the Wave Checker software from CETECOM. We need to connect the output J9 of the EMVCo reference PICC to the oscilloscope and set the jumper J8 of the EMVCo reference PICC in the fixed load position. The oscilloscope needs to be connected to the PC or laptop, so the software is able to get the waveform and analyze the parameters needed. Type A tests The waveform group of tests for Type A consists of the following test cases: TA121: t1 TA122: Monotonic Decrease TA123: Ringing TA124: t2 TA125: t3 and t4 TA127: Monotonic Increase TA128: Overshoot Some of these test cases are directly related to the parameters defined for the specific modulation phase for Type A at 106 kbps. This modulation phase along with the respective parameters is depicted in the figure below. When the Wave Checker gets the oscilloscope capture, it automatically analyzes the signal, performing all the measurements and comparing them with the specifications limits. Debugging hints for Type A The PN5180 has a few registers and parameters to control the wave shape generated by the NFC chip and transmitted by the antenna. These are the most relevant ones: TX_CLK_MODE_RM (RF_CONTROL_TX_CLK register) Rise and Fall times (RF_CONTROL_TX register) TX_OVERSHOOT_CONFIG register From all the different test cases we will show how to debug the t3 and t4 test case as it is usually the most problematic. For this purpose, we will start from a certain configuration where the waveform tests show the following results, with a fail in the t3 and t4 test case. In order to tackle this problem, we will rely on the TAU_MOD_RISING parameter from the RF_CONTROL_TX register of the PN5180. In this case, as the timings are slightly above the maximum allowed in the specifications we will decrease the TAU_MOD_RISING 3 points and execute again the tests. The results after the modification show that all test are passing with a certain margin:   Another parameter that the PN5180 has and can be used for the waveform tests is the TX_CLK_MODE_RM parameter from the RF_CONTROL_TX_CLK register. Below you can see two graphs that clearly illustrate the effect of this parameter over the waveform.  As you can see from the two figures, by changing the default high impedance configuration of 001, to a low side pull configuration the waveform results in a smoother decay of the envelope. Type B tests For Type B waveform, the specifications define the following test cases:  TB121: Modulation Index TB122: Fall time TB123: Rise time TB124: Monotonic Increase TB125: Monotonic Decrease TB126: Overshoots TB127: Undershoots Again, these tests are based on the different parameters that can be identified for the modulation phase of the Type B commands: Debugging hints for Type B The register and parameters that the PN5180 includes to control the waveform for type B are: TX_RESIDUAL_CARRIER (RF_CONTROL_TX register) TX_CLK_MODE_RM (RF_CONTROL_TX_CLK register) TX_UNDERSHOOT_CONFIG register TX_OVERSHOOT_CONFIG register For Type B, we will study the modulation index test case, as it is the one that needs to be adjusted more often. In this case, we start from a situation where the device presents problems in the modulation index at 1 cm, with a value below the limit. In order to make corrections of the modulation index we will use the TX_RESIDUAL_CARRIER parameter from the RF_CONTROL_TX register. This parameter controls the amplitude of the residual carrier during the modulated phase. For the present problem, we will increase it by 4 points and rerun the test. As you can see in the picture below, the modulation index is within the specifications limits with margin.  Adaptative Waveform Control The PN5180 has another interesting feature called Adaptative Waveform Control that is used to set a different transmitter configuration depending on the gear and protocol used at any moment. This way we can easily debug by positions and use specific configurations for a certain group of positions without the need of rerunning all the tests for the rest of the positions. With the AWC feature we can control the: TAU_MOD_FALLING TAU_MOD_RISING TX_RESIDUAL CARRIER We can see in the table an example of an AWC configuration for Type B. Where we have changed the Residual Carrier from gear 2 onwards. As you can see, It is also configured with a change in the falling and rising times from Gear 1. As you can see this Adaptative Waveform Control feature along with the DPC represent a powerful tool to easily debug waveform tests without a change in the HW. Reception tests The reception tests purpose is to evaluate the ability of the device to identify and correctly demodulate the responses from the PICC when this response comes in the limits of the specifications for amplitude and polarity of the modulation.  Tests setup The tools and setup needed to debug the reception tests for EMVCo are depicted in the following figure: Oscilloscope to capture the signal received by the reference PICC. Arbitrary Waveform Generator to generate the response of the PICC. PC Software to control the AWG and load the EMVCo responses to the EMVCo reference PICC. For our case, we will use the Wave Player software from CETECOM. EMVCo reference PICC. This time, we will use the output J9 of the reference PICC to the oscilloscope to capture the command from the reader and trigger the injection of the response from the waveform generator to reference PICC, connected to J2. We should connect the waveform generator to the computer that has the Wave Player software installed to load the EMVCo responses. Performing tests As said previously, the reception tests aim at testing the ability of the device to correctly interpret the response when it is generated at the limit of the amplitude and polarity of the modulation. Considering the positive and negative polarity and the maximum and minimum amplitude of the modulation we have the following four test cases that are performed both for Type A and Type B: Tx131: Minimum positive modulation Tx133 - Maximum positive modulation Tx135 - Minimum negative modulation Tx137 - Maximum negative modulation To debug these tests with the PN5180 we will use: RX_GAIN (RF_CONTROL_RX register) RX_HPCF (RF_CONTROL_RX register) MIN_LEVEL (SIGPRO_RM_CONFIG register) MIN_LEVELP (SIGPRO_RM_CONFIG register) The procedure is basically to use the Waveplayer to set the amplitude and polarity of the response and check in the device is the response was correctly received and demodulated. Debugging hints To debug the reception we will test different configuration for the RX_GAIN and RX_HPCF parameters that control the reception filters, amplifier and ADC blocks from the receiver branch. These receiver blocks are pictured in the diagram below. Depending on the values used for the RX_GAIN and RX_HPCF parameters, the filter will be defined accordingly. The following table shows the filter characteristics in relation to those values: If we don’t find a correct value to pass the test at a certain position, we should modify the Rx resistor in order to increase or decrease the receiver sensibility. Adaptative Receiver Control In the same line as the Adaptative Waveform Control, the PN5180 includes the Adaptative Receiver Control that can be used to define different reception configurations depending on the gear and protocol used. With the ARC we can control all the registers involved in the reception and apply a correction to the preconfigured value depending on the gear used.  We can see an example of the Adaptative Receiver Control configuration in the following table, where we have defined a correction of -1 to the MIN_LEVEL and the HPCF parameters from gear 1. We can also see that the RX_GAIN parameter has a correction of +2 from gear 0. The ARC is very useful when we can't find a proper configuration for all positions and we need a different set of values depending on the positions tested. Rx Matrix tool Another interesting tool for debugging the reception tests is the Rx Matrix tool. This tool is used to launch and tests different receiver configuration in an automated way. The Rx Matrix tool is integrated into NXP's NFC Cockpit and you can control the Arbitrary Waveform Generator to set the amplitude of the modulation used for the tests. We can select which parameters we want to change and in which range we want them to be tested and the Rx Matrix will automatically run all the possible combinations in a sweep.   With the Rx Matrix tool, we can select the expected response and the number of iterations we want to try for every possible configuration. That way we can obtain a success ratio for the communication and easily identify the best configuration for the position tested. An example of the Rx Matrix is given in the figure below. We have fixed the RX_GAIN and RX_HPCF parameters and performed a sweep for the MinLevel, testing it from a value of 0 to 8. We have set the Rx Matrix to execute 50 iterations for every configuration, obtaining the success ratio results plotted below. As you can see the Rx Matrix along with a Waveform Generator is a powerful tool to find the optimum receiver configuration in a short time and in an effortless way. PN5180 Ecosystem The PN5180 comes with a complete and useful product support package including: The demokit, that can be used to get introduced to the product and check its features. The NFC Cockpit, that we have talked about during this article, and that represents a powerful tool to control the PN5180 with a very intuitive and useful interface. We srongly recommend that you integrate this tool in your final device as it may save you a lot of time during the debugging phase. A complete documentation including the updated product datasheet, or a set of application notes to guide you through all the designing process, from the antenna design guide to the DPC configuration or use of the Rx Matrix tool. Last but not least, the NFC Reader library which is the recommended software stack for NXP's NFC frontends and NFC controllers with customizable firmware. NFC Reader Library The NFC Reader Library comes with built-in MCU support, but it can also run on different MCU platforms, as well as non-NXP. The library has been built in such a way that you can adapt it and implement the required driver for your host platform. Other characteristics are: It is free of charge and you can download the latest release from NXP’s website. It is a complete API for developing NFC and MIFARE-based applications. Includes an HTML-based API documentation for all the components, which is generated from source-code annotations.  Finally, the release includes several examples and applications. Among the examples and applications included in the NFC Reader Library we can highlight two applications that are very useful for the preparation of the Device Test Environment required for the EMVCo certification:  The SimplifiedAPI_EMVCo for the digital testing The SimplifiedAPI_EMVCo_Analog for the Analog testing. You can control all the parameters involved in both applications using the phNxpNfcRdLib_Config.h configuration file. The identification and modification of these parameters should be very easy as the code is well documented, like you can see in the code chunk in the image: Further information You can find more information about NFC in: Our NFC everywhere portal: https://www.nxp.com/nfc You can ask your question in our technical community: https://community.nxp.com/community/identification-security/nfc You can look for design partners: https://nxp.surl.ms/NFC_AEC And you can check our recorded training: http://www.nxp.com/support/online-academy/nfc-webinars:NFC-WEBINARS Video recorded session
View full article
This post entry provides a guide to designing antennas for the NTAG I2C plus. This article has been structured as follows: How the NTAG I2C plus works The NTAG I2C plus is what we call a connected NFC tag. It combines a memory, a passive NFC interface and a contact I2C interface. Additionally, it has more features such as: A field detection pin, to send a wake-up signal to a connected MCU The Energy harvesting, able to power external devices The SRAM, a memory without writing cycles limitation The pass-through mode, for fast data exchange between interfaces Memory access control options, available from both NFC and I2C interfaces And the originality signature, to protect your brand against clones As such, it supports bidirectional communication between an NFC-enabled device and the host MCU and it is an ideal solution for Industrial applications, IoT nodes, meters, consumer electronics and accessories among others.  To enable the NFC interface, the chip needs to be connected to an antenna coil using the two dedicated antenna pins. How to design this coil is the main goal for today. NTAG I2C plus antenna design files The NTAG I2C plus support package includes development kits, demo apps, sample code, application notes, and, the design files of the Class 4 PCB antenna, and the Class 6 Flex antenna, which are available for direct and free download from the website.   These design files include: The schematics  The Gerbers The BoM Therefore, if you do not have any antenna size or shape constrains in your application, the easiest is to just copy & paste these reference antennas. On the other hand, if you need to design your custom antenna, NXP also offers a coil design Excel sheet to help you. I will talk more about it along the article. Basic antenna theory for NTAG I2C plus tags The NTAG I2C plus is an 8-pin package, with: The field detection pin The Vout pin The I2C serial clock and data Iines to the MCU The ground The VCC wo antenna pins NTAG I2C plus electrical input capacitance The NTAG I2C plus equivalent circuit can be represented with: A resistor, representing its current consumption And a parallel capacitor, representing the chip internal capacitance For the NTAG I2C plus, this capacitance is 50pF for both the 1k and 2k memory versions. Precisely, the chip capacitance is the most important factor for the antenna tuning. Antenna coil electrical equivalent circuit The antenna coil itself is a resonant circuit with an input impedance. The electrical equivalent model of the antenna coil consists of: An inductance A capacitance And some resistive losses of the loop antenna itself. The actual impedance value depends on:  The antenna material The thickness of the turns, mainly affecting the resistance  The distance between the windings, mainly affecting the capacitance The number of turns, mainly affecting the inductance  And the nearby environment Tag with an NTAG I2C plus electrical equivalent circuit When the NTAG I2C chip and the antenna coil are assembled, we can consider a parasitic resistance and capacitance generated by the connections between the chip and the antenna. This parasitic impedance depends on the assembly process used and the antenna material.  As a result, what we can observe in the schematic of the figure is that the NTAG I2C plus capacitance together with the parasitic connection capacitance and the antenna capacitance forms a resonance circuit with the inductance of the antenna coil.   The self-resonance frequency of a system is given when the imaginary part of the circuit equivalent impedance is null, and the system is only purely resistive. Considering the antenna loop inductance, the parallel equivalent capacitance and the parallel equivalent resistance of the tag, the resonance frequency and the quality factor of the tag can be calculated by these formulas. Antenna design procedure for NTAG I2C plus tags The antenna design procedure for the NTAG I2C plus tags is:  Design the antenna coil. This is about the antenna specs in terms of number of turns, track width, spacing, shape, etc according to your application requirements. Characterize the antenna coil and find its R, L, and C parameters. Calculate the parallel capacitor value required to adjust the tag resonant frequency Assemble the calculated capacitor and measure the results. If the results are not accurate enough, fine-tune the capacitor value, assemble and measure again as needed. Design the antenna coil  As part of the ISO14443 standard, six PICC antenna classes are defined. Per each of the antenna class, the physical characteristics and dimensions are defined. For instance, Class 1 is the largest, with a size comparable to the size of a regular credit card, and Class 6, which is the smaller one. In addition, Class 3 to Class 6 define two antenna shapes: a rectangular and a circular one. However, tag manufacturers are not constrained to conform to any of these dimensions. Therefore, its use is optional and rather intended to improve interoperability. As such, you may consider using these antenna sizes as a reference for your designs. The major parameter of the antenna coil is the inductance. This inductance can be estimated based on geometrical parameters and the material properties such as: The diameter for a round antenna or the overall length and width for a rectangular shape. The track width The gap between track The thickness And the number of turns To avoid cumbersome formulas, NXP offers you an Excel-based coil calculation tool to estimate the inductance of rectangular and circular antennas. This tool uses some parameters related to the material used and the antenna dimensions. And with it, it estimates the antenna inductance for you. Typically, the coil design steps include: An estimation of the electrical parameters, like the operating frequency and the chip capacitance The definition of the target inductance, we define the dimensions, the track width, the gap between track, the thickness, etc that achieves our target inductance. The production of prototypes. Based on the matrix run, with different inductance values deviated between 10-20% plus and minus the original value. Characterization of the coil prototypes. Based on this characterization, select the one with the best parameters for your application.  If needed, you can execute a second matrix run, with new prototypes, based on the first results. Measure the antenna coil parameters The antenna characterization can be done using a network analyzer connected to the antenna pads, isolated from the rest of the circuit. For our case, a low-end solution, such as the miniVNA PRO is sufficient. This device is cheap compared with the high-end devices like Agilent but still, accurate enough for our needs.  As a remark, it is fundamental that this characterization is done with the antenna placed at its final mounting position, so that all environment effects, like metal plates or others, are considered. Calculate the resonant capacitor value We use a network analyzer to measure the system resonant frequency after connecting the NTAG I2C plus to the antenna coil. As I explained before, the self-resonant frequency of the tag is given when the system is purely resistive. Most likely, the actual resonant frequency will not be 13.56MHz as we would like, but some other value. If that is your case, calculate the system capacitance at the current resonant frequency based on the equation derived from the NFC tag equivalent circuit shown previously. At this point: We know the current resonant frequency We know the antenna inductance, because we measured it before with the network analyzer And, as design parameter, we define the target resonant frequency With this data, we can use once again, this formula to calculate which is the resulting capacitance that would make our tag resonate to our target resonant frequency. Knowing the required total capacitance and the actual capacitance, we can calculate the extra capacitance missing. This is given by this formula: Regarding the target resonant frequency, for single tag operation, a tuning slightly above 13.56 MHz would lead to maximum read-/write distance. However, due to manufacturing tolerances, a nominal frequency up to 14.5 MHz would still operate well. Assemble and measure resonant frequency Therefore, the last steps are: Solder the capacitor in parallel Connect the network analyzer And measure the new resonant frequency  If the resonant frequency measured is not the target one, repeat the process by fine tuning the capacitor value.  If the frequency is higher than expected, you can increase the capacitor value. On the other hand, if the frequency is lower than expected, you can decrease it. Example: Tuning for a 54x27mm PCB antenna Based on a real lab exercise, this section illustrates the steps to adjust the tuning of an antenna for the NTAG I2C plus. As described before, we need to start by characterizing our antenna coil. In this lab exercise, we have used a PCB antenna of 54 by 27 mm and, we have connected our miniVNA PRO to the antenna pads. The results that we have obtained from this measurement are that our PCB antenna has an inductance around 895 nH. After characterizing the antenna coil: We have soldered the NTAG I2C plus chip to this PCB antenna. Right after, we connect again the miniVNA PRO to measure the actual resonant frequency.  In this case, it returns a resonant frequency near 24 MHz. Using the formula, we calculate that the tag capacitance at 24 MHz is almost 50 pF. Note that, the actual capacitance is basically the chip capacitance as the antenna and connection capacitance is usually not impacting significantly. Obviously, a resonant frequency of 24MHz is way too high for a ISO14443 NFC tag like our NTAG I2C plus. Therefore, we need to add some capacitance to the system so that we can bring this resonant frequency down. As an example, for this lab exercise, we are adjusting the tag to around 13.6 MHz, intentionally a bit higher than the NFC operating frequency. With a target resonant frequency to 13.6MHz and an antenna inductance is around 895nH,  the result is that the tag needs a total capacitance of around 153 pF. This means that we need to solder an extra capacitance of 100pF to bring down the resonant frequency.  So we go to our component box, and select the closer commercial value (100pF). As a last step, it is worth to measure how well adjusted is our system after adding the 100pF. We connect the miniVNA to the system including the IC, the antenna and the 100pF. Now, the results obtained are that the resonant frequency is 13.8 MHz. In our case, we consider this as good enough. However, you are always free to repeat this process as many times as needed until you obtain the accuracy that you need. Summary The antenna tuning steps for the NTAG I2C plus that we followed are: Design the antenna coil. You can use the NXP reference antennas or design your own antenna coil using the NXP Excel-based calculation tool. Measure the antenna coil. Use a network analyzer connected to the antenna pads, without any other circuitry Calculate the extra capacitance. Measure the current resonant frequency, and we calculate the extra capacitance needed to achieve the desired operating frequency. Solder and measure. If the results are sufficient, you are done. Otherwise, repeat the process with a new capacitance value As you can see, the antenna tuning process is quite straight forward. Basically, it is a matter of adjusting the capacitance of the tag until the operating frequency is the right one. Further information You can find more information about NFC in: NTAG I2C plus website http://www.nxp.com/products/:NT3H2111_2211 NTAG antenna design guide support package https://www.nxp.com/docs/en/application-note/AN11276.zip NXP technical community: https://community.nxp.com/community/identification-security/nfc NXP design partners: https://nxp.surl.ms/NFC_AEC Video recorded session On 25 July 2018, a live session explaining this topic was delivered. You can watch the recording here:
View full article
This post entry provides a detailed description of the OM29263ADK kit, a new antenna tuning development kit specially designed to facilitate the NFC antenna prototyping process. This document has been structured as follows: OM29263ADK kit contents This kit consists of a single PCB board that includes:  A pre-matched antenna of 2 turns and a size of 77 by 113 mm.  A second pre-matched antenna of 4 turns and a smaller size of 20 by 20 mm.  And, 8 extra boards to prepare the matching for custom antennas. As a result, this kit is a perfect resource for different purposes such as evaluating the RF performance of different antenna sizes and, for prototyping your custom antenna quickly. In addition, this NFC antenna development kit is compatible with our existing product support package. You can directly connect it to CLRC663 demoboards, as well as to PN5180 and PN7462 demoboards after a minor tuning. Using OM29263ADK kit with CLEV6630A or CLEV6630B The process is really straightforward… First, take one CLRC663 demoboard and separate the main PCB from the antenna & matching circuit. The board includes cut lines, so you can divide both sections easily by only using your hands. Second, break the kit OM29263ADK PCB so that you separate the pre-matched antenna from the other PCB parts. Then, it is just a matter of connecting the two parts together. The kit antenna includes pin male connectors while the CLRC663 board includes the corresponding female connectors. Therefore, hook up the antenna with the main board, solder the connectors and that’s all. We can observe that when we connect the kit large antenna to the reader PCB, the  impedance measured with our network analyzer shows that the tuning is adjusted to approximately, 19 Ohms. This is the result obtained without any hardware modification The same process applies for the smaller antenna: Similarly, we can observe that when we connect the kit small antenna to the reader PCB, the  impedance measured with our network analyzer shows that the tuning is adjusted to approximately, 36 Ohms. This is the result obtained without any hardware modification: Using OM29263ADK kit with PNEV5180B or PNEV7462C In case you are interested to connect the OM29263ADK kit antennas to the PNEV5180B or PNEV7462C boards, the preparation process is the following: First, separate the antenna and the matching section from the PN5180 or PN7462 demoboards, as before, using the cut lines. Then, take one kit sample, and separate the pre-matched antennas for the other PCB parts. And finally, adjust the EMC filter. The EMC filter adaptation is required because the kit antenna is prepared for asymmetric tuning while the PN5180 and PN7462 original antenna use a symmetrical tuning. The main difference between both types of tuning is the cut off frequency. The symmetric tuning uses a cutoff frequency around 15MHz, while the asymmetric can go up to 22 MHz. In practice, for this adaptation, we only need to change the value of the capacitor C0 in the main board. For instance, the existing 220 pF capacitor can be replaced for another one of 68 pF. Using OM29263ADK kit to connect your own antenna coil This section describes how to use the kit PCB boards for our custom antenna tuning. For this task, the list of material that we need is: A reader PCB board, in the example, we picked CLRC663 One of the PCBs for antenna matching included in the kit And, the any antenna to be matched  In our case, we have selected one sample antenna available in our lab. The following explanation will be guided using this antenna as a reference, but any antenna can be tune using the same process. The usual list of steps to tune a custom antenna are: First, we need to define target impedance and Q factor, as design parameters for our reader Then, we will characterize the antenna coil and find its parameters After that, we will design the EMC filter With this, we will calculate the matching components using an Excel sheet Afterwards, we will assemble the calculated components and measure the first results. We will take field measurements, which probably will show that it is not perfect, so we may need to adapt the matching values With these fine-tuned vales, we will re-assemble again And finally, we will design the receiver circuit. Define target impedance and Q-factor First, we start defining the target impedance and Q-factor. The target impedance is a design parameter, which needs to be chosen according to our needs whether we want to go for maximum field strength or minimum battery consumption or a trade-off in between. Typically, reasonable values are between 20 Ohms and 80. Another important design parameter is the Q factor. The Q factor is a dimensionless parameter indicating the performance of a resonant circuit. The higher the Q factor, the higher the read range. On the other hand, increasing the Q factor also reduces the bandwidth of the circuit. As a result, in practical implementation, Q-factor values below 30 are demonstrated to fit well for the ISO14443 wave form timing requirements and corresponding spectrum.  For our tuning exercise, the design parameters chosen are an impedance of 20 ohms and a Q factor of 25 Measure antenna coil Next step is to characterize the antenna coil. Any antenna coil has an input impedance. This input impedance is complex and consists of an inductance, capacitance as well as some losses represented by a resistance (R). The actual values depend, among others, on antenna material, thickness of conductor, distance between the windings, number of turns, etc.  The coil characterization needs to be done with a network analyzer. It could be a high end, such as Agilent or Rohde & Schwarz, which is powerful, accurate, easy to use, but expensive. Or we can also go for low end solutions, such as the miniVNA PRO, which is cheap compared with the previous ones, and accurate enough for our needs. In our case, the characterization of our lab antenna shows:  An inductance around 1.3 uH And a resistance of 2.5 Ohms Design EMC filter The next step is to design the EMC filter. As we are using CLRC663, we will go for an asymmetric antenna tuning. Good inductor values are between 330nH and 560nH. and 21MHz cutoff frequency is ideal for asymmetric tuning. Fixing this two parameters, we can easily calculate the required capacitor component for our EMC filter with the formula below. In our example, we need to use a capacitor of C= 122 pF. With this, we just pick up the closer commercial value from our components box Calculate matching circuit components We have characterized the antenna coil and completed the EMC filter. Now, we can calculate the matching network components. The matching components need to be calculated so that the maximum power from the reader is transmitted to the antenna. This happens when the equivalent impedance seen from the reader IC only has the real part, without the complex part. There are some complex calculation involved in the process. In order to avoid these cumbersome formulas, NXP provides a useful Antenna Tuning excel sheet that calculate the appropriate components for you. Below, you can see a screenshot of the Excel sheet in the slide. This sheet calculates C1 and C2 matching values according to the inputs expected from the user. These are The measured antenna coil parameters The EMC filter parameters. The target impedance and Q-factor of our design With these values, The Excel sheet calculates and outputs the value of the matching components: C0, C1, C2 and Rs. In our exercise, the output values calculated for the matching network by the Excel sheet are C1 around 43 pF and C2 around 144 pF Assemble and measure Typically, the calculated values do not match with commercial components. The easiest way is to add components in parallel to get as close as possible to the calculated values. If we take a closer look to the kit antenna matching PCB board, the pad location is the following: We have two slots for C0 – so we can have two capacitors in parallel to achieve a better accuracy on the capacitance value we need to achieve We also have two slots for C1, for the same purpose We have two more slots for C2 soldering We also have two slots for the dampening resistor, in case we need to reduce the Q-factor of our antenna. And finally, one slot for the receiver resistor circuit. After the first component assembly, it is worth performing a field measurement to find out how accurate our matching is in reality. Typically, the measured impedance is different than the impedance calculated in the simulation. Therefore, the calculated matching components were not 100% accurate. But we knew that in advance. We were aware that we were just getting a rough approximation to the antenna parameters. As a result, a good matching is achieved after a number of iterations according to the field measurements that we obtain. As a general rule,  C1 changes the magnitude of the matching impedance and C2 changes its imaginary part. In our exercise, after soldering the first components, the equivalent impedance is around 19 Ohms but it also has a significant imaginary part. As a result, it can be fine-tuned towards better performance. We modified C1 and C2 a couple of times until we found out the final values that work better. obtaining a impedance with only real part at 22 Ohms (C1= 36pF and C2=154 pF). Adjust receiver circuit The last step of tuning our antenna is to design the receiver circuit. The Rx circuit that consists of a voltage divider and a coupling capacitor connected from the output of the EMC filter to the RX pins of the NFC reader. The objective is to set the voltage level at the reception pins to achieve the compromise between a good sensitivity. For CLRC663 plus, the serial resistor is in the range of 7 and 15 kΩ. You can start with a 11 KOhm value, then, the resistor can be adjusted depending on the voltage measured in the Rx pins. If the voltage at Rx pin is higher than 1.7 V, it is recommended to increase the resistor value and if the voltage at Rx pin is below than 1.2 V, it is recommended to decrease the resistor value. Using OM29263ADK kit to evaluate the performance of different antenna shapes The section covers how you can use the antennas included in the kit for performance comparison. Please note that this lab exercise is shown only for illustrative purposes on how the kit can be used to evaluate the performance of different antenna shapes. As an example, we defined a sample scenario where we want to characterize how the field strength decreases with distance when using antennas of different size. For that, we used the following setup: A class 1 ISO14443 Reference PICC A scope A CLRC663 board connected to the small antenna A CLRC663 board connected to the large antenna A ruler to measure the distance The measurements were taken in this way: We tuned the large and small antennas to 20 Ohms We connected the board to the laptop, and we executed the NFC Cockpit tool to control the RF field. We measured with the scope the voltage level obtained by the ISO14443 Class 1 Reference PICC while we increased the distance. Background information Before actually showing you the results, it is worth it to review a couple of antenna design principles to properly understand the results. Coupling coefficient Before actually showing you the results, it is worth it to review a couple of antenna design principles to properly understand the results. The coupling coefficient is a parameter that indicates how much of the magnetic field generated by the reader is picked up by the card. The coupling coefficient takes a value between 0 and 1 If the coupling equals 1, it means we have a perfect coupling, all magnetic field lines are picked by the card If the coupling equals 0, it means we have no coupling at all, no magnetic field lines are picked by the card The key message is that the coupling coefficient is just a geometric quantity. It depends on: The reader and card antenna dimensions (both antenna radius) Their relative position (whether in parallel or perpendicular, they will pick a different amount of magnetic field lines) The distance between them And the magnetic properties of the medium Mutual inductance Very related to the coupling coefficient, we have the mutual inductance. The mutual inductance allows us to determine the voltage induced in the card antenna, that depends on: Coupling coefficient  Better coupling, higher the voltage Driver current  The higher the current we drive in the reader antenna, the stronger the magnetic field Antenna inductance Precisely, in this setup, we are going to measure the voltage perceived by the reference PICC when using two different antennas. Antenna tuning components used for the large antenna First, we prepared a tuning of 20 Ohms in the large antenna. This task was done using the process described above. As an example, we selected a low Q-factor of 10, which helped us to accommodate high bit rates for ISO14443. In the figure below, you can see the components we assembled to tune the large antenna near to 20 Ohms. Antenna tuning components used for the small antenna Second, we prepared a tuning of 20 Ohms in the small antenna so that the results are comparable. The same Q-factor and EMC filter values were used, but obviously, as the antenna size is different, we used different C1, C2 and Rs values to achieve the same equivalent impedance OM29263ADK large antenna vs small antenna The following graph shows the results we obtained: The blue line, represents the DC output voltage obtained from the Class 1 Reference PICC as we increase the distance from the reader using the large antenna… The green line, represents the DC output voltage obtained from the Class 1 Reference PICC but using the reader with the small antenna connected. As a result, what we see is that at close distance, both antennas are able to deliver the same field strength. However, as distance increases, the RF field of the small antenna starts to attenuate quickly from 2 cm distance of the reader while the RF field of the large antenna is more or less stable until 5 cm, after that, it starts to attenuate quickly as well. Potentially, what we can conclude is that for this setup, we might be able to get more reading distance with the large antenna. ISO/IEC14443 vs ISO/IEC15693 reader - Quality factor We need to bear in mind that our antenna is not only for energy transfer, but also it should match with the waveform requirements. Therefore, from the practical point of view, the Q factor of the system is limited by the bandwidth as if we increase the Q, we increase the field strength but we decrease the bandwidth. Our reader can be optimized whether we are designing a reader for ISO14443 or ISO15693 as the signals modulation and timing requirements of the rise and fall times for both RF protocols are different. Actually, in practice, ISO15693 allows us a higher Q factor because there is a lower bandwidth requirement as the waveform timings are more relaxed and, the power transfer requirement is lower than ISO14443. For such optimization, you can refer again to NXP antenna tuning excel sheet. If you recall, one of the input fields of the excel sheet is the Q-factor. Therefore, you can introduce here a value below 30 for ISO14443 readers or below 100 for ISO15693 readers. The excel will output reasonable matching values for the first components adjustment. After that, you can do a fine tuning according to the process I explained before. Further information You can find more information about NFC in: Our NFC everywhere portal: https://www.nxp.com/nfc You can ask your question in our technical community: https://community.nxp.com/community/identification-security/nfc You can look for design partners: https://nxp.surl.ms/NFC_AEC And you can check our recorded training: http://www.nxp.com/support/online-academy/nfc-webinars:NFC-WEBINARS Video recorded session On 21 June 2018, a live session explaining this topic. You can watch the recording here:
View full article
Combining NXP's wireless MCU with NFC controller allows to build a BLE-NFC bridge. It allows demonstrating transmission of NFC data over BLE, acting then as a king of Magic NFC remote. This demonstrator is built assembling the OM5578: Development Kits for PN7150 Plug’n Play NFC Controller (OM5578/PN7150ARD version including Arduino compatible connectors). on top of the FRDM-KW41Z: Freedom Development Kit for Kinetis ® KW41Z/31Z/21Z MCUs (minimum version B1 since previous versions have a pin conflict on the Arduino connector) Alternatively the Rigado R41Z Eval Board can be used as replacement to the FRDM-KW41Z To complete the demonstration, an android phone is used as BLE counterpart. It shall run the modified version of Kinetis BLE Toolbox android application including the NFC demo part. This dedicated version of the Kinetis BLE Toolbox android application is available for download from the files attached to this document. Below is a video of the demo. As shown, it demonstrate capabilities to control the NFC discovery remotely (via BLE) from the phone. Then, if tapping a card on the bridge, the related information including the content is conveyed through BLE to the phone and get displayed by the app. Additionally, the app can configure a message to be shared whenever an NFC reader (e.g. NFC phone) tap the bridge. The K41Z firmware of this demo is built based on the wireless UART example from MCUXpresso Software Development Kit (SDK), and updated with the porting of the NXP-NCI MCUXpresso example. The complete MCUXpresso project is given in source code in the attached files. To replicate the demo, just import it in an MCUXpresso workspace by selecting "Existing Projects into Workspace", then browsing to the BLE-NFC_bridge_MCUXpressoProject.zip file. Select the frdmkw41z_BLE-NFC_bridge from the "Project Explorer" view, and click on the blue bug icon to build, flash and debug the program.
View full article
This post entry provides a detailed description of how NFC can be used for authentication and identification of consumables and accessories. This document has been structured as follows: NFC for product authentication and identification NFC is a useful addition to verify product authenticity and identification. There are plenty of examples where NFC fits nicely, for instance: For anti-counterfeit protection and safe brand reputation. For identifying users and provide personalized interactions For sending notifications when accessories need to be replaced And to automatically adjust settings of the main unit based on the accessory attached. These are just a few examples so you grasp the potential of NFC in such scenarios. How NFC works in product authentication and identification Into the scope of a consumable or accessories authentication via NFC, there are always two components involved.  On the one hand, there is one main unit. This is the device where you can plug the part or the accessory. Typically, this main unit would include an active NFC reader. On the other hand, the consumable or replacement would include and NFC tag. The NFC reader in the main unit can detect when the removable part is connected. As soon as the replacement is connected, it reads the information stored in the tag and uses it to verify the accessory originality. Precisely, the information and security features implemented in the tag is what allows the main unit to: First, authenticate that is a genuine accessory And optionally, configure related settings depending on the accessory. Success stories The NFC authentication is not a proof-of-concept but rather a consolidated solution. There are already some success stories in the market. For example: A high-end blender that uses NFC to verifies the authenticity of the containers and cups used. In addition, the blender adjusts the speed parameters automatically per each different container. As mentioned, the NFC reader is part of the base unit while the tag is part of each container. Another example, a face brush that make sure that the brush head is genuine. As before, the reader in on the base while the tag is on each head brush. When a new head brush is connected it check its validity and adjust the settings. The third example is a fridge that discards non-original water filters and check if the fridge and filter models are compatible. How to implement the use case From a simplified block diagram perspective, the base unit embed an NFC reader, this NFC reader is made of an NFC frontend, generating the RF field and a Host MCU, loaded with the application firmware. On the other hand, the accessory, beds an NFC tag. The MFRC630 or our SLRC610 are recommended options from the reader side, while the NTAG and ICODE families are recommended from the tag side. The final product selection depends on your specific application requirements There are a few questions that you can ask yourself to know which product fits you best. First, what is your application about? Are you looking for brand protection? Or counterfeit detection? Or settings customization? Second, what kind of security you need? You need device identification, or you also would like encrypted data exchange? Third, what reading distance is required in your system? Are we talking about a centimeters or tenths of centimiters? And, in relation implementation details, are there any specific size constrains? Is there metal in the surrounding? Etc. NFC portfolio for authentication and identification applications I organized the security features for consumable authentication in three groups: There is a basic level security level where the tag UID is used for proof-of-origin. In this case, there is no crypto protocols applied and the verification consists on checking whether the UID is in our database or not. There is a second level, where the authentication is proven using an originality signature. Depending on the solution, this can be an NXP- signature or a customer-specific signature. There is a third level, that uses a cryptographic three pass mutual authentication as a verification mechanism. NXP originality signature The originality signature implemented in NTAG and ICODE families is based on standard Elliptic Curve Cryptography. NXP generates a ECC key pair (a public and a private key) that are stored in a secure server. In asymmetric crypto, a signature is generated by a signing algorithm given a message and a private key. During production, NXP takes care of provisioning a die-individual signature in each IC. This signature is generated using the tag’s UID and the NXP private key. Since each tag has a different UID, a unique signature is stored in each tag. Therefore, the tags leave the NXP factory already with this unique signature pre-programmed in the IC memory. These pre-provisioned tags are integrated by OEM into their final devices & accessories. On the field, the originality signature verification process is as follows: First, the reader unit reads the tag UID. Second, the reader retrieves the tag signature with the READ_SIGNATURE command. Third, the reader can verify this tag originality signature using the corresponding ECC public key and the tag’s UID. With this feature, it is possible to verify with confidence that the tag is using an IC manufactured by NXP and not a cloned IC. In case that the public key is stored in the reader, the entire process can be performed offline. The products supporting this functionality are: NTAG21x, NTAG413 DNA, NTAG I2C plus, NTAG21x F and ICODE SLIX2. OEM customizable orignality signature The NFC tags come pre-programmed with an NXP originality signature. However, some NTAG and ICODE family members also offer the possibility to customize the originality signature per OEM. The process is similar to the one described above, but in this case, the OEM provisions each tag with a die-individual signature, and lock it to avoid unauthorized overwriting. On the field, the tag originality signature verification is done in the same way: The reader retrieves the tag UID and tag signature The reader uses the corresponding OEM public key and tag UID to verify the signature. The main benefit of customizing the originality signature is that, in addition, it allows to verify that the product belongs to the OEM and not from another manufacturer. The products supporting customer originality signature are NTAG210u, NTAG 213 TT and ICODE DNA. Secure unique NFC message (SUN) One security level up, we find solutions like our NTAG 413 DNA which enable a new Secure Unique NFC message (SUN) feature. This SUN feature generates a unique, secure authentication code each time the tag is tapped. This tap-unique data consists of an NDEF formatted packet that includes: A URL The tag UID The tap counter And a AES-based CMAC calculated over the UID, the counter and the URL. This CMAC is dynamic and changes over each tap since the counter is increased every time. The cloud service verifies the authenticity of the message with the appropriate symmetric keys. With this tag, any NFC enabled device (including Android and the recent iOS 11 devices) can automatically connect to a web based service and based on the information contained in URL, the device can check the tags authenticity and verify the information validity. AES three-pass mutual authentication The last tag security feature is the AES mutual authentication, which is supported by our NTAG 413 DNA as well as the ICODE DNA. The mutual authentication: It is based on a shared secret key known by both endpoints It allows us to verify both ends of the communication (not just the accessory). . The AES 3 pass mutual authentication consist of probing to the other end the knowledge of a secret, in this case, the knowledge of a secret AES key. As we do not want to share in plain this secret over an unsecure channel, the mechanism is based on the encryption of random challenges using this secret key. If both ends are capable of verifying this random-challenge scheme, they demonstrate that the other end knows the secret, and therefore, they prove their authenticity. NFC tag security feature comparison The following table consolidates the different NFC tag security options:  The NTAG21x support NXP originality signature The NTAG210u is a cost optimized version with customizable originality signature The NTAG413 DNA offers the SUN feature as well as AES authentication and encryption Finally, the ICODE DNA comes with customizable originality signature and AES authentication. Therefore, the NTAG413 DNA and ICODE DNA are the strongest authentication options that we have right now in the tag portfolio. The reading distance will influence on the decision between NTAG or ICODE: NTAG is an ISO14443 compliant tag with a operating distance of a few centimiters. ICODE is an ISO15693 compliant tag with an operating distance of tens of centimers. NFC frontends comparison Regarding the NFC readers for the base unit side, we most ideal solutions are: The SLRC610 plus if your application needs a reading distance of tens of centimiters. The SLRC610 supports ISO15693 and is fully operational with our ICODE family. The MFRC630 if your applications needs a reading distance of a few centimiters. The MFRC630 supports ISO14443-A and is fully operational with our NTAG family. NFC Nutshell kit This section leverages on the NFC Nutshell kit to explain how to develop your own NFC authentication solution. This kit was developeb by GMMC an approved engineering consultant of NXP. The NFC Nutshell kit is a set of hardware modules that can be used for: NFC integration into new designs or retrofitting into existing products thanks to its small size. It can be used to build NFC demonstrators Or, it can be used for evaluation, development and testing of NFC applications The main benefits offered by the NFC Nutshell kit are that: It is made to provide designers with Nano sized hardware modules which can be configured and combined in a variety of ways. It was developed with flexibility in mind so that designers can easily combined different MCUs with different NFC frontends and multiple development environment easily. And, it is constructed and prepared to be compatible with NXP software tools. NFC Nutshell kit components The kit includes a good bunch of modules that be divided in 4 different groups: Host interface modules A USB plug that bridges the USB communication to the Host MCU A USB converter that is used to communicate over UART, I2C or SPI with the host MCU A host interface signal debug extender MCU modules: LPC1769 LPC11U68. NFC reader modules: CLRC663 plus PN5180 And soon, PN7462 and PN7150 Antenna PCBs of different sizes to test the performance over different antenna sizes (20x10mm, 20x20mm, 40x40mm, 72x48mm). All the modules are connected with flexible flat cables, and the hardware components are designed for minimal PCB area to demonstrate integration into space constrained products. Modes of operation for the USB protocol converter module In our case, out of the different host interface modules, we select the USB to I²C, UART and SPI converter. This single module itself has several configuration options. As part of the kit, a USB Protocol Converter Configure Tool is provided to easily configure the different operation modes of this component. The user can open this tool and check the different options: The first one is used when the converter is connected to an MCU. It configures the module for an in-system-programming, which means we can use NXP Flash Magic Tool to program the MCU flash memory.  The second option, the development PC communicates directly to the connected NFC frontend via UART.  Last, we have 3 bridge modes for single protocol conversion. The Host system can send the any command over the USB interface and it will be converted to the chosen protocol, either I²C, SPI or UART.  NXP development tools supported Another nice feature of this NFC Nutshell kit is its native support of NXP development tools. Using this kit, you can seamlessly run: The NFC Cockpit, an intuitive graphic user interface that lets you configure and adapt IC settings without writing a single line of software code. The RFIDDiscover PC tool, a user-friendly GUI for evaluation of NTAGs, ICODEs or MIFARE Cards. It is the software that is commonly used with NXP Pegoda reader. The NFC reader library, a complete SW support library for RF frontend ICs. The faster and more straightforward way to develop NFC applications. Consumable authentication using the NFC Nutshell kit This last section is meant to give insight on how to develop your own NFC authentication solution. For that, we will make use of the NFC Nutshell kit and existing software examples as a way to illustrate a possible development process.  The five steps that we followed to run a tag signature verification software example in the NFC Nutshell kit are: First, we select and connect the right modules together Second, we configure the host system interface according to our SW development environment. After that, we develop the application logic of our use case. When the code is ready, we build the project, and create the binary file. And last, we use the Flash Magic tool to install the binary file. Hardware preparation About the hardware preparation… the modules selected are: The USB protocol converter module, as an interface converter between the development PC and the reader host MCU. The LPC1769 as the reader host MCU The CLRC663 as NFC frontend And, the 40x400 mm PCB antenna. USB converter module configuration Before going to the software development itself, we need to configure the USB protocol converter. The USB protocol converter mode of operation configuration is a straight forward process. We just need to execute the Configure Tool provided in the kit, and select the mode compatible for Flash Magic.  In this case, this setting corresponds to the first choice as shown in the screenshot. Software development with the NFC Reader Library For the application software development, we leverage on our well know NFC Reader Library. The NFC Reader Libary is a complete API for developing NFC and MIFARE-based applications, it is free of charge and the latest release can be downloaded from www.nxp.com/pages/:NFC-READER-LIBRARY. Great news is that the NFC Reader Library has: Native support for the modules we selected out the NFC Nutshell kit (the CLRC663 plus and LPC1769) Supports the proximity and vicinity RF protocols. And also, the commandset of Type 2, Type 4 and Type 5 tags. Therefore, we can focus on developing the application logic rather than spending time on implementing drivers or the RF protocols. For that, we do not even need to start from scratch, because we can take as reference any of the eleven software examples. Each of these examples do not make use of the entire library, but just use the NFC Reader library components required for the use case demonstrate, allowing to reduce the overall memory footprint. NXP Originality signature verification We take the Basic Discovery loop example as a starting point for developing an piece of code for tag originality signature verification. If we have a look at the source code, this example: Initialize the library, this is initializing the SW components that will be used It configures the discovery loop for tag detection Keeps iterating until a tag is detected Once the tag is detected, we mentioned that the signature verification process consisted of: Retrieving the UID Retrieving the signature Use a signing verification algorithm to check the signature There are several libraries implementing ECC signature validation. As an example, we added an open source C library called nano-ECC into our project. The function call ecdsa_verify() can process the originality signature read from the tags. It is just as simple as passing as arguments, the UID the signature and the public key. In addition, the NTAG Originality signature validation application note provides code snipets and instructions for this process as well. Three-pass mutual authentication Another example for the implementation of a AES three-pass mutual authentication. Once again, we can take as a starting point the Basic Discovery loop example, which: Initializes the library, configures the discovery and iterates until a tag is detected. In addition, we need to add the crypto component in the NFC Reader Library handling the crypto calculation and key storage (in orange) Once the tag is detected, we can make a direct API function call of the corresponding tag type, whether it is a Type 5 (ICODE) or a Type 4 tag (NTAG 413 DNA) there is the right function call in the lib for that. All the crypto complexity of the three pass mutual authentication is just hidden behing a single function call. Build project with MCUXpresso The MCUXpresso tools is used to build and compile the solution by clicking in the hammer button down in the quick start panel. Create .hex file with MCUXpresso After that, we can also generate the .hex file. For that, we just need to right click on the binary file, go to binary utilities and click on create hex file option. Flash the MCU image with Flash Magic tool With the .hex file generated., the last step is to flash our MCU with this .hex file. In the Flash Magic tool menu, select: The MCU used, in this case LPc1769 The COM port, which can be found in the Windows device manager, in our case COM72 Select the path to the .hex file Click start Once the flashing is completed, the USB converter setting should be changed to I2C or SPI configuration. At this moment, the solution is running and the application will try to authenticate any tag presented in front of the reader. Debugging mode Optionally, the NFC Nutshell kit also incorporates a code debugging mode. For that, there is an extra HW module compatible with LC1769 and LPC11U68 that can be used to interface with an LPC-Link2 debug probe. Video recorded session On 22 February 2018, a live session explaining the NFC for consumable and accessories solution was recorded. You can watch the recording here: Available resources The available resources referred to this post explanation are:  Tags: NTAG 413 DNA NTAG 210μ NTAG 213 TT ICODE DNA Readers: MFRC630 plus SLRC610 plus Application notes: AN11350 NTAG Originality Signature Validation NFC Nutshell kit: GMMC
View full article
This post entry provides a detailed description of how to port the NFC Reader Library to Kinetis K64F MCU. It is used a real porting example exercise to show the steps required to adapt the NFC Reader Library to a sample target MCU. The goal of this post is to serve as a guide for software developers requiring to port the NFC Reader Library to their MCU of choice for their designs. NFC Reader Library overview The NFC Reader Library is a software stack for creating and developing contactless applications for NXP’s NFC frontends and NFC controllers with customizable firmware. This library provides an API facilitates the most common operations required in NFC applications such as: reading or writing data into contactless cards, exchanging data with other NFC-enabled devices or emulating cards. The NFC Reader Library: It is based on a modular approach It has been designed with a flexible and multilayered architecture It is written in ANSI-C programming language It is supported in multiple design environments and platforms and it has been developed with a strong focus on portability. It is available for free download. The NFC Reader Library v5.02.00 currently supports: All our NFC frontends (CLRC663 plus PN5180) and PN7462 NFC controller. Their corresponding development boards, used as NXP reference HW (CLEV6630B, PNEV5180B, PNEV7662B) And built-in MCU support for LPC1769, LPC11U68, FRDM-K82F and Raspberry Pi. In addition, the release includes several examples to get familiar with the library and which can be used as reference for your developments and, it is also included an HTLM-based API documentation for all the components, which is generated from source-code annotations. NFC Reader Library architecture The NFC Reader Library is encapsulated into layers, differentiated by colors, and components, differentiated in boxes. From top to bottom, we have: The Application Layer (AL), which implements the command sets to interact with MIFARE cards and NFC tags. The NFC activity, which implements a configurable Discovery loop for the detection of contactless cards, NFC tags or other NFC devices. Next to it, the HCE and P2P components, for the emulation of Type 4 tags and P2P data exchange respectively. The protocol abstraction layer (PAL), which contains the RF protocol implementation of the ISO14443, Felica, vicinity and NFC standards. One level down, the hardware abstraction layer (HAL), which implements the drivers for controlling the NFC frontends RF interface and capabilities. Below, the Driver Abstraction Layer (DAL), newly introduced in the latest release, which implements the GPIO pinning, the timer configuration and the physical interface (BAL) between the host MCU and the reader IC. Finally, the OSAL module, in charge of abstracting the OS or RTOS specifics (handles tasks such as timers, events, semaphores and threads) This layered architecture is helpful for several reasons: The eleven software examples, the Application Layer (AL) and the Protocol Abstraction Layer (PAL) are HW-independent, so that can be used on top of any NFC frontend. The the Application Layer (AL), the Protocol Abstraction Layer (PAL) and the Hardware Abstraction Layer (HAL) are platform-independent, so that can run in any MCU without any additional change. In case the reader MCU is part of the built-in support, the examples can be directly imported and executed straight forward. On the other hand, in case the reader MCU is not supported by default, the major advantage is that only adaptations in the DAL and OSAL layers are required, while the rest of the layers can be used without any modification. The NFC Reader Library structure can be seen more clearly when imported in the MCUXpresso development environment. After completing the import wizard, all projects are listed in the “Project Explorer” window. As can be seen in the screenshot, it contains different folders: API documentation folder Driver Abstraction Layer FreeRTOS support The platform support (in the screenshot, corresponding to the LPC support) The software examples (11) The Reader Library implementation And the OS abstraction layer NFC Reader Library porting to FRDM-K64F steps In the existing NFC Reader Library v5.02.00 release there is no native support for Kinetis K64F. However, it is included a pre-compiled package for Kinetis K82F MCU. We use the K82F NFC Reader Library package as a reference project to start the porting to K64F MCU. This package can be downloaded from www.nxp.com/pages/:NFC-READER-LIBRARY. The steps required to port the library to Kinetis K64F are: Prearing the HW (i.e the pining between the Kinetis and the NFC reader board). Setting up the development environment (i.e workspace). Perfoming some changes in project configuration settings Performing some code modifications in the DAL and application code for adding Kinetis K64F support. NFC Reader Library porting to FRDM-K64F - Preparing the hardware The hardware used for this porting exercise is: A CLEV6630B board (CLRC663 plus) as an NFC transceiver  A FRDM-K64F board (Kinetis K64F) as host MCU, used to load and run the application logic. The CLRC663 plus evaluation board is connected by default to an LPC1769 µC via SPI. However, the board is made in such a way that the LPC1769 MCU can be bypassed to connect an external MCU easily. For doing so: Six resistors from the board need to be removed. These are highlighted in red. Use the SPI pin connectors available on the left hand side, on the board edge. Next, to connect the two boards together, the pining routing was done as follows: We use the Kinetis K64F jumper 2 pin line for the MOSI, MISO, chip select and clock lines of the SPI communication. The IRQ, interface selection and reset pins of CLRC663 plus are connected in jumper 1 pin line. And, one ground pin used for reference. Therefore no complex HW manipulation was required since all interfaces are easily accessible via dedicated headers or test points. NFC Reader Library porting to FRDM-K64F - Setting up the development environment Once the HW connection is prepared, we can move to setting up the development environment and workspace. Get the latest NFC Reader Library release From the software perspective, first we need to download the latest NFC Reader Library package. To do so: Go to NXP dot com slash pages slash NFC Reader Library (www.nxp.com/pages/:NFC-READER-LIBRARY) Go to the Downloads tab and click on the download button Click download on the NFC Reader Library for Kinetis K82Fpackage. Generate a downloadable SDK package for FRDM-K64F board As part of the NXP support, an SDK with drivers, middleware, RTOS demos and more is available for any of its Kinetis and LPC micros.We need to build the corresponding one to K64F SDK. For that: Navigate to www.mcuxpresso.nxp.com and select SDK builder option. Then, use the drop-down menus to customize your SDK configuration, middleware and optional software components be included in the package. Select Request build. In a few minutes, you will receive an email with a link to download the SDK package, very similar to the one showed in the figure below. Import the NFC Reader Library into MCUXpresso workspace Next step to configure the development environment is to import the library package in the workspace. The easiest way is to use the Quick Start Panel on the left hand side. Click on Import project from file system Then, browse the library package in your file system. Click Finish to import it all to your workspace. Install and link FRDM-K64F SDK into MCUXpresso workspace The last step is to import the K64F customized SDK we configured from the MCUXpresso tools. To do so: Just drag and drop the SDK into the installed SDKs tab of the MCUXpresso IDE. (It will appear in the bottom part, in the center) Import the SDK into the workspace and link it with the software examples. It will appear as another folder in the project explorer window. If the K64F SDK has been properly imported in the workspace, we should see a new drop-down menu for K64F. From there, we should select K64F and click Apply so that the memory details for K64F are set to the project example NFC Reader Library porting to FRDM-K64F - Project configuration changes At this point we have the hardware and the workspace for software development ready. In this step, we will start porting the NfcrdlibEx1_BasicDiscoveryLoop  software example provided as part of the NFC Reader Library release. Select FRDM-K64F SDK in the project MCU settings One of the first configurations to be changed is the project MCU settings. These settings indicate which target host device is running the application code. These settings can be found if: You right click on the project example > Properties In the left-hand list of the Properties window, open “C++ build” and select “MCU settings” In the right-hand panel, we can observe the corresponding settings for K82F micro. The left figure indicates the project configuration settings used by the default SW example prepared for K82F while the right figure indicates the final project configuration settings used by the SW example ported to K64F. Define FRDM-K64F SDK preprocessor symbols in the project After that, we need to change the compiler preprocessor settings, which can be found in C++Build > Settings. In the project examples of the NFC Reader Library, the conditional directives like #ifdef and #ifndef are used to include or exclude portions of the code from the actual compilation. The conditional codes are included in the program compilation only if the MACROs are defined in the project compiler preprocessor settings. In the left side we can see the defined macros for the original project. Among them, includes one which defines that the HW used is PN518 and K82F board. Therefore, in the ported project, we need to replace the macros corresponding to K82F with the new ones corresponding to K64F.  For instance, the PHDRIVER_K64_CLRC663 macro includes in the compilation the files related to the new HW used in the ported project (for the board pin and GPIO config, SPI settings or timers). Precisely, these files are included inside BoardSelection.h file in the Driver Abstraction Layer (DAL). Add include paths for FRDM-K64F SDK files When including header files into our project, the compiler must be told which directories must be searched to find those files. To do this: Open the project properties. In the left-hand list, open “C++ Build” and Select “Settings”. In the right-hand pane, choose the “Includes” section. Click the “Add icon”. In the left figure, we see the compiler include paths for the K82F SDK of the original example. In the ported example, the K64F SDK sources will not yet compile since we did not tell the compiler about all the new include paths. Therefore, we need to add the new include paths pointing to the K64F SDK and put them into the MCUXpresso IDE project. In the right figure, you can see the paths we included for this purpose. Mainly, these paths reference to the board system init, board drivers, CMSIS files and debug utils. Add include path for FRDM-K64F MCU assembler The last MCUXpresso settings to be changed is in the MCU Assembler. This can be found in the right-hand panel, choose the “MCU Assembler” and select “General”. In the original source code, a path is used to the K82F SDK. In the ported example, we just need to remove the previous include path and replace it with the corresponding one pointing to the K64F SDK in our workspace. NFC Reader Library porting to FRDM-K64F - Code changes So far, we have the HW, the development environment prepared and the project configuration settings changed. At this point, there are only a few code changes to be done before the porting is completed and the software example can be run in K64F. DAL driver adaptation for FRDM-K64F The layered architecture of the NFC Reader Library makes porting easier since only the lower drivers need to be adapted. This driver includes functions for: The physical link connection establishment between the CLRC663 plus and K64F The init functions for timers and interrupts so they are correctly used by the application layer. Going to the NfcrdlibEx1-BasicDiscovery loop project structure, it contains several folders. If we open the DAL > board folder, we can observe one source file per each supported platform (LPC with PN5180 and CLRC663, and the same for Raspberry Pi and Kinetis K82F). Our task for the porting would be to create an equivalent source file for the new supported board, the K64F together with the CLRC663 (e.g. Board_FRDM_K64FRc663.h). This file includes The related board pin and GPIO configurations The SPI configuration The timer configuration In addition, we need to include the board, pin_mux and clock config files. Use SDK examples to get FRDM-K64F board specific configuration Implementing these board specific files, in some cases, could be time consuming and may require experience. However, you do not need to do so but rather use the existing source files. For that, you can use any of the existing SDK software examples. You can easily import one SDK example by: Clicking the “Import SDK” example in the quick start menu > select the FRDM-K64F board. Selecting the demo example. Each example application has its own unique copy of the board, pin mux, and clock config files that you can reuse for the porting (Note: this process could be different depending on the MCU used). Add FRDM-K64F macro definitions in the source code Next, along the project tree, we need to add the #ifdef directives, indicating that K64F board files that need to be compiled. This is the case for: The BoardSelection.h file The ph_NxpBuild_App.h, which links the board with the reader IC by enabling the CLRC663 plus module in the HAL layer. The ph_AppInit.h so that the board is initialized when the reader device boots. Add FRDM-K64F CPU initialization code The ph_AppInit.h  file takes care of the code initialization and code specific to the HW used to run the example. As part of this ph_AppInit.h file, there is a function in charge of initialization the host MCU. Here, we need to implement the corresponding function for the K64F init, based on the SDK example source code selected earlier. If we look within this routine, we actually find functions for: Configuring the MCU clocks. Configuring the MCU pins. Configuring the interrupts (PIT). NFC Reader Library porting to FRDM-K64F: NfcrdlibEx1_BasicDiscoveryLoop execution After following the previous steps, the source code is succesfully ported to K64F. The following video demonstrates the correct execution of the NfcrdlibEx1_BasicDiscoveryLoop example in FRDM-K64F host MCU connected to CLRC663 plus NFC frontend (CLEV6630B). The video includes a webcam, which records the HW, including all the witing wiring between the K64F and the CLRC663 plus antenna. After the code is built and compiled, the video shows how some tags are tapped to validate that the example is working as expected (tag's UIDs are displayed in the MCUXpresso console). . General considerations to port the NFC Reader Library to your target MCU Overall, the general steps required to port the NFC Reader Library to your target MCU are: Adapt the MCU drivers to the DAL layer in the NFC Reader Library. This typically includes: timers, interrupts, pining and host interface configuration between the NFC reader and host MCU sides. Adapt the OS layer (i.e. you might need to port the FreeRTOS or to your target OS platform). Adapt the source code examples: project settings (macros, include paths, MCU configuration) and perform the required code modifications (Code for HW initialization, board files, etc). Available resources NFC Reader Library:  www.nxp.com/pages/:NFC-READER-LIBRARY CLRC663 plus: www.nxp.com/products/:CLRC66303HN CLRC663 plus development kit: www.nxp.com/demoboard/OM26630 FRDM-K64F board: www.nxp.com/demoboard/FRDM-K64F Video recorded session
View full article
This post entry provides a detailed description of how to develop an NFC pairing solution for audio devices. For that, we will describe in detail an audio speaker prototype made by NXP. This post entry has been structured as follows: Use cases for Bluetooth and Wi-Fi pairing via NFC As the number of connected devices grow, the more important it becomes to connect them in a simple way. At the same, it is required to provide a consistent and pleasant user experience. NFC pairing is one popular NFC use case, just bringing two NFC-enabled devices close together is all it takes to create a connection. For instance: To connect to your TV, to transfer a video from your phone, or sharing screens between your tablet and the TV. To connect to your camera to transfer pictures. To connect your phone to a wireless speaker. To connect your new devices to the home network. To connect to your wearables to read your heart rate. Or, to set-up a multi-audio system with NFC. Precisely, this post will guide you through the implementation of the NFC pairing solution for a multi-audio system. Benefits offered by the NFC pairing solution There are several benefits to consider adding NFC to your consumer device. First, from the consumer perspective: It provides a faster and simpler way to link wireless devices, only one touch. The credentials for establishing this connection are exchanged in a secure way. The device is identified instantly, without conflicts. In addition, from the manufacturer perspective, the benefits come mainly from: Making the device more attractive, by adding a new feature. And making the device easier to use, reducing the cost associated to customer technical support. Overall, NFC pairing is an interesting solution since it combines the simple, one-touch setup of NFC with the higher speed, longer distance communication of BT or Wi-Fi networks Pair and unpair Bluetooth headsets with just a tap with NFC NFC pairing process steps To pair and send music to a BT headset is as simple as: Select and play a music track in our phone. Tap the BT headset with the phone. When doing so, the BT pairing credentials are exchanged securely via NFC without any manual settings. The phone automatically initiates a BT connection request. After a second, audio is streamed via BT to the headset without entering any manual configuration. Furthermore, this is not only restricted to phones and headsets, but in general between any two NFC-enabled devices. Therefore, it is also possible to pair and send music to two Bluetooth headsets at the same time, creating what is known as “a silent disco”. Again, the process is simple: First, tap the two headsets with NFC capabilities. When doing so, the headsets automatically exchange the pairing credentials. The headsets establish a BT connection. And audio is streamed between them without requiring any manual setting. Similarly, instead of creating a silent disco, wireless speakers can be paired together via NFC to create a multi-audio system.  As such, NFC offers a real one-touch solution. It works with any NFC phone and no dedicated app needs to be installed. NFC unpairing process steps To stop sending music and un-pair the headset is easy as well. A second tap is the only action required to disconnect the headsets. After the tap, the second headset automatically de-activates the audio streaming and switches off. Best of all, we have instant identification of the device to be disconnected. Therefore, zero chances to unpair the wrong device as might happen through the phone settings, where we can unintentionally pick the wrong one. Multi-audio wireless speaker demo with NFC pairing capabilities During the rest of this post, we will tear-down an NFC multi-audio wireless speaker prototype developed by NXP based on PN7120 NFC controller solution. Hardware architecture This demo consists of two speakers with the same components, and therefore, the same functionality. If we dismount one of the speakers, the components we can find in the device PCB are: A system on chip solution, with an application processor, embedded flash memory and BT wireless connectivity. A system crystal clock, the BT antenna and two audio speakers A power supply unit, which includes three 1.5V batteries providing a stable 1.8V output. A NFC reader module, based on PN7120 chip, with an integrated antenna and a compact form factor. Application circuit for Bluetooth power on by NFC triggering If we have a closer look to the power unit interface, we see that: The VBAT pin is directly connected to the batteries. (PN7120 it supports a wide range of power supply voltages, from 5.5V down to 2.75V) The pad supply (PVDD), for the host interface operation, is connected to the 1.8V from the PMU. A wake-up trigger is built so that the BT controller is powered when an RF-field is detected. Regarding the host interface between the NFC controller and the main system MCU: The PN7120 module is connected to the BT controller via I2C slave interface. It supports standard, fast and high speed I2C modes (100 kHz SCL, 400 kHz SCL, 3.4 MHz SCL) The corresponding pull-up resistors are connected on the data and clock lines (SDA and SCL). The IRQ pin is used for ensuring the data flow control between PN7150 and the BT controller. The VEN (RESET) pin, used for setting the device in hard power down mode.  And, in respect to the antenna interface: The PN7120 VGA package Some discrete components for the antenna matching And the antenna coil surrounding the PCB edge. Software architecture and NCI interface In this section, we detail the solution software stack and how the NFC application logic works within the overall system. Using the block diagram, we have added the software blocks in orange.First, the PN7120 module includes: The NCI firmware & transport mapping layer for I2C communication (nothing to take care of from the developer side, since this firmware already comes embedded in the chip). Similarly, the host controller side requires: The NCI driver & transport mapping layer to communicate with PN7120 On top of these layers, the application logic for the BT pairing is implemented. Finally, the BT stack for the audio streaming, , but this software piece is not detailed here as it is out of the scope of the NFC implementation. NFC controller interface (NCI) specification details NCI describes the internal interface between an NFC Controller and the main host platform (in this case, between PN7120 and the BT chip). NCI is defined by the NFC Forum organization. As such, it provides manufacturers with a standard interface they can use for whatever kind of NFC-enabled device they build (making integration easier, saving time and effort). The next figure represents the NCI architecture: At the bottom, we find the transport mapping blocks, which map the NCI protocol to an underlying physical connection (I2C, SPI, UART, etc) The NCI core defines the messages, commands and data format for the different communications On top, the NCI modules implement specific functionalities, like the RF discovery which configures the NFC controller to communicate with other NFC tags or devices. From the overall NCI architecture, this implementation makes use of: The transport mapping is the I2C block The RF discovery is configured so that the speaker iterates between the reader, card and P2P modes NFC controller interface: RF Discovery PN7120 firmware can combine the three NFC modes of operation using the RF Discovery as defined in NCI spec. The RF discovery is a cyclic activity which activates various modes of operation. This consists of a loop which alternates two phases: The polling and the listen phases. In the polling phase, the PN7150 acts as Reader or NFC Initiator for the P2P mode, searching for passive tags or an NFC target device. If no card or target was detected, it enters a listening phase, to potentially be activated as card or P2P target If no device to interact is detected in the polling or listening phase, it switches back to polling phase after a timeout. All RF technologies supported by PN7120 can be independently enabled within this discovery loop. However, the PN7120 is in poll phase generates RF field and consumes current. Therefore, the more technologies to be polled, the larger the average current consumption. Multi-audio speaker prototype: RF dscovery configuration To enable the speaker-to-speaker pairing functionality, each of the speakers needs: To have the capability to discover a remote speaker and initiate a pairing operation. Or the other way around, be discovered by a remote speaker to complete a pairing operation. To accomplish this, the speakers need to sequentially move from polling and listening phases. As such, the discovery loop configured in the application iterates between reader, P2P and card modes.During the polling phase, the speaker generates an RF field, and uses an NFC-A polling sequence looking for: A remote card or device in card emulation. If found, the NDEF data with the pairing info will be retrieved and processed. Next, it looks for a remote P2P device. If found, it pushes an NDEF message with the pairing info to this remote peer. On the other hand, during the listening phase, the speaker turns off its RF field and waits to be discovered by a remote device: If it is discovered while operating as P2P target, it will pull an NDEF message coming from the remote speaker. If it is discovered while operating in card mode, its NDEF message will be read by the remote speaker. The precise communication that takes place between the two speakers will differ every time. It will depend on the polling loop status of both speakers at the instant they are tapped. Application logic Until now, we have described how both speakers are discovered, and therefore, how they can start a communication to exchange pairing data via NFC. The next step is to  describe which data and which data format is used to exchange the pairing details. NFC Forum specifications The NFC Forum organization defined a set of specs explaining how to exchange pairing data over NFC in an interoperable way with just a tap, independent of the manufacturer and without installing any dedicated application for it. These are: Connection handover: This spec defines how two NFC devices can negotiate and activate an alternative communication carrier.  NDEF: The NDEF spec defines a message format to exchange data between NFC devices, including pairing data. Tag 1 Type to Tag 5 Type specs: These specs define how NFC devices can interact with five different types of tag technology. As a result, any NDEF message store in any of these five types of tags will be processed by any NFC-compliant device. NFC pairing: Static handover As mentioned earlier, how pairing data is transferred between the two speakers will depend on the discovery loop status. The static handover takes place when: One speaker is in reader mode / polling mode. (left hand side) The other speaker is in card mode / listening mode, showing a Type 4 Tag with an NDEF message on it (right hand side). The process is as follows: The speaker in reader mode activates RF field and generates a NFC-A polling sequence. The remote speaker in card mode responds to the polling command. The reader retrieves the NDEF data from the remote speaker, using the commands as defined in Type 4 tag NFC forum spec. The reader processes the carrier data from the NDEF message and establishes a BT connection according to BT protocol. The speaker in card emulation mode deploys a Handover Select NDEF record, advertising its BT carrier. In The NDEF message, we store: The BT device address (MAC address) Bluetooth local name (Friendly name for the user) Class of the device (e.g. headset, mobile, etc) This is the carrier data that will be used by the application to trigger the BT connection. After this proces, both devices start streaming music over BT. NFC pairing: Negotiated handover The other possibility is that when both speakers are tapped, they find themselves during the P2P operation. In such a situation, the pairing process will be conducted according to the Negotiated handover mechanism. One of them will take the role of initiator, the other the target role: The initiator will poll for target devices The target will respond to the initiator command The initiator will send a handover request message, with the carrier details The target will respond with a handover select message, indicating the selected carrier option. On the received data, the initiator will establish a connection according to BT protocol. After that, both devices start streaming audio over BT. In this case, both speakers exchange data with their alternative carrier capabilities, could be more than one. The initiator communicates to the target device its carrier capabilities with a Handover request record followed by an NDEF record per each available carrier (in this case, just one BT carrier). After that, the target replies to the initiator with the selected carrier to be used for the out of band data transfer. As before, the BT configuration in the NDEF message includes fields such as: BT address, device class, BT local name, and optional data if secure pairing according to BT spec is required.The key here is that, this negotiation protocol and these message formats are specified and defined in the NFC Forum specs, so they offer an interoperable solution for any compliant-platform Support package  This section details resources and information provided by NXP you can use to replicate your own multi-audio speaker solution with NFC pairing capabilities. PN71xx family of NFC controllers PN71xx family are solutions integrating an RF frontend together with an embedded microcontroller with dedicated FW and NCI interface. They fully comply with the NFC Forum, include Linux®, Android™, and WinIoT drivers and sample code for bare metal and RTOS integration. Additionally, they support direct supply from a battery, different power states and an ultra-low power polling loop. Their features make it ideal for NFC integration into any application, especially those with OS system. Hardware support From a hardware point of view, several demokits are available to evaluate PN71xx family. They interface into popular platforms, such as: Raspberry Pi BeagleBone Black Any board featuring an Arduino compatible header like LPCXpresso or Kinetis Freedom among others. In case you have to evaluate PN71xx into any other platform, these kits can be reused, The PN71xx board provides all required signal pins easily accessible so that you can design and build your own interface board for your target platform. Software support From a software support point of view,  device manufacturers can easily integrate PN71xx family in Linux, Android and Win IoT systems through the available SW drivers. But also, NXP supplies a set of code examples running on LPC and Kinetis MCUs for Bare metal RTOS integration. Precisely, the demo presented in this post, leverages on the NullOS/RTOS SW examples. The software example for PN71xx integration into RTOS / Bare metal system is made of 3 components: The NXP-NCI module offers an API for configuring, starting and processing the NFC device discovery The NDEF library offers an API for processing NDEF data over reader, card and p2p modes: The transport mapping layer providing HW abstraction for the host – NFC controller connection On top of it, developers can implement their own application. Available resources PN7120 product website: www.nxp.com/products/:PN7120 PN7120 demokits: www.nxp.com/products/:OM5577 PN7120 product website: http://www.nxp.com/products/:PN7150 PN7120 demokits: www.nxp.com/products/:OM5578 Reference source code and related documentation: https://www.nxp.com/doc/SW4325 and http://www.nxp.com/docs/en/application-note/AN11990.pdf  Video recorded session
View full article