AN12991

PN7160 evaluation kit quick start guide

Rev. 1.1 — 13 September 2021

Application note

COMPANY PUBLIC

Document Information

Information Content
Keywords OM27160, PN7160, Raspberry Pi, Arduino, eval kit, NFC, P2P, Card Emulation, Linux, Android, RTOS, Null OS
Abstract This document gives a description on how to get started with the PN7160 evaluation kit.

1 Revision History

Rev Date Description
1.1 20210913 Security status changed into "Company public", no content change
1.0 20210825 Initial version

2 Introduction

This document gives a description on how to get started with the PN7160 evaluation kit, referenced as OM27160A1EVK for the I²C host interface version (featuring PN7160A1HN I²C variant) and OM27160B1EVK (featuring PN7160B1HN SPI variant). It provides a step-by-step guide to the installation procedure of the hardware and the software. Finally, it shows PN7160 NFC Controller functionalities through demo applications.

2.1 PN7160 evaluation kit description

The PN7160 evaluation kit exists in 2 versions:

Figure 1. PN7160 evaluation kit

[Image: A photograph of the PN7160 evaluation kit, showing a main PCB with an attached NFC antenna coil. The PCB has various electronic components and connectors.]

Both versions are composed of 3 printed circuit boards and an NTAG card.

2.2 Linux driver support

The PN7160 NFC controller is supported under GNU/Linux system using the NXP Linux libnfc-nci software stack (see [2]).

2.3 Android driver support

The PN7160 NFC controller is supported from the official Android Open Source Project (refer to [3] for more details) with the addition of dedicated patches (see [4]).

2.4 RTOS and Null OS support

Since implementing the NFC Forum NCI 2.0 standardized API, the PN7160 NFC Controller can be easily integrated into systems based on RTOS or even without an OS. Code examples are given in the form of MCUXpresso projects (dedicated to specific NXP's MCUs) and can easily be ported to any other system (refer to [5]).

3 Quick Startup with Raspberry Pi interface board

3.1 Required items

3.2 Hardware setup

First, assemble the PN7160 NFC controller board (OM27160A1HN or OM27160B1HN) with the Raspberry Pi interface board (OM29110RPI).

Figure 4. OM27160 RPI configuration

[Image: A close-up view of the PN7160 NFC controller board (OM27160A1HN) with its components and connectors clearly visible, positioned for connection to a Raspberry Pi.]

Then, stack the boards together with the Raspberry Pi board.

Figure 5. OM27160 evaluation kit and Raspberry Pi board stacked together

[Image: An image showing the PN7160 evaluation kit (NFC controller board and Raspberry Pi interface board) stacked together, ready for use with a Raspberry Pi.]

3.3 Software setup

Use Raspbian (https://www.raspberrypi.org/software/operating-systems/). Guidelines to set up a Linux environment on Raspberry Pi can be found here: https://www.raspberrypi.org/documentation/installation/installing-images/.

3.3.1 Enable I²C interface (only for OM27160A1EVK)

  1. Run command: sudo raspi-config
  2. Use the down arrow to select "Interface Options"
  3. Arrow down to "P5 I2C"
  4. Select "yes" when it asks you to enable I2C
  5. Use the right arrow to select the <Finish> button
Figure 6. Enabling I²C interface on Raspbian

[Image: A screenshot of the Raspberry Pi Software Configuration Tool (raspi-config) showing the "Interface Options" menu, with the "P5 I2C" option highlighted for enabling the I2C interface.]

To verify the I²C interface is enabled, enter the following command ls /dev/i2c*. The Pi should respond with "/dev/i2c-1" which represents the user-mode I²C interface to which the PN7160 is connected.

3.3.2 Enable SPI interface (only for OM27160B1EVK)

  1. Run command: sudo raspi-config
  2. Use the down arrow to select "Interface Options"
  3. Arrow down to "P4 SPI"
  4. Select "yes" when it asks you to enable SPI
  5. Use the right arrow to select the <Finish> button
Figure 7. Enabling SPI interface on Raspbian

[Image: A screenshot of the Raspberry Pi Software Configuration Tool (raspi-config) showing the "Interface Options" menu, with the "P4 SPI" option highlighted for enabling the SPI interface.]

To verify the SPI interface is enabled, enter the following command ls /dev/spi*. The Pi should respond with "/dev/spi0.0" which represents the user-mode SPI interface to which the PN7160 is connected.

3.3.3 Install necessary tools

Execute the command:

sudo apt-get install autoconf automake libtool git

3.3.4 Clone Linux libnfc-nci library repository

Execute the command:

git clone https://github.com/NXPNFCLinux/linux_libnfc-nci.git -b NCI2.0_PN7160

3.3.5 Configure the library

Execute the commands:

cd linux_libnfc-nci
./bootstrap
./configure

3.3.6 Set the library to map I²C interface (only for OM27160A1EVK)

Edit the linux_libnfc-nci/conf/libnfc-nxp.conf file to update the NXP_TRANSPORT and NXP_NFC_DEV_NODE settings as shown below:

###############################################################################
# TRANSPORT Type
# 0x00 - I2C /SPI for noraml nxpnfc driver
# 0x01 - Not Used, kept to align with Android code
# 0x02 - ALT_I2C
# 0x03 - ALT_SPI
NXP_TRANSPORT=0x02
###############################################################################
# NXP HW Device Node information
NXP_NFC_DEV_NODE="/dev/i2c-1"

3.3.7 Set the library to map I²C interface (only for OM27160B1EVK)

Edit the linux_libnfc-nci/conf/libnfc-nxp.conf file to update the NXP_TRANSPORT and NXP_NFC_DEV_NODE settings as shown below:

###############################################################################
# TRANSPORT Type
# 0x00 - I2C /SPI for noraml nxpnfc driver
# 0x01 - Not Used, kept to align with Android code
# 0x02 - ALT_I2C
# 0x03 - ALT_SPI
NXP_TRANSPORT=0x03
###############################################################################
# NXP HW Device Node information
NXP_NFC_DEV_NODE="/dev/spidev0.0"

3.3.8 Build and install the library

Execute the commands:

make
sudo make install
export LD_LIBRARY_PATH=/usr/local/lib

To make this last setting permanent, run the following command:

echo "export LD_LIBRARY_PATH=/usr/local/lib" >> .bashrc

3.3.9 Run the demo application (built and installed together with the library during previous step)

To simply display all data collected from a remote NFC device (Peer, reader/writer, or card), run the demo application in "poll mode" executing the command:

nfcDemoApp poll

For more details about the demo application modes, execute the command:

nfcDemoApp --help

For more detailed information about the demo application, but also for additional example applications, please refer to [2].

4 Quick Startup with Arduino interface board

Refer to [5] for details about PN7160 demonstration using OM27160 ARD configuration on Arduino compatible NXP's MCU boards.

5 References

  1. The Raspberry Pi is a low-cost, credit-card-sized computer that plugs into a computer monitor or TV and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing and to learn how to program in languages like Scratch and Python. It is capable of doing everything you would expect a desktop computer to do, from browsing the Internet and playing high-definition video, to making spreadsheets, word-processing, and playing games. For more information about it, please visit https://www.raspberrypi.org/
  2. AN13287 PN7160 Linux porting guide: https://www.nxp.com/doc/AN13287
  3. Android is an open-source software stack for a wide range of mobile devices and a corresponding open-source project led by Google. For more information about it, please visit https://source.android.com/
  4. AN13189 PN7160 Android porting guide: https://www.nxp.com/doc/AN13189
  5. AN13288 PN7160 NXP-NCI2.0 MCUXpresso examples guide: https://www.nxp.com/doc/AN13288

6 Legal Information

6.1 Definitions

Draft - A draft status on a document indicates that the content is still under internal review and subject to formal approval, which may result in modifications or additions. NXP Semiconductors does not give any representations or warranties as to the accuracy or completeness of information included in a draft version of a document and shall have no liability for the consequences of use of such information.

6.2 Disclaimers

Limited warranty and liability - Information in this document is believed to be accurate and reliable. However, NXP Semiconductors does not give any representations or warranties, expressed or implied, as to the accuracy or completeness of such information and shall have no liability for the consequences of use of such information. NXP Semiconductors takes no responsibility for the content in this document if provided by an information source outside of NXP Semiconductors. In no event shall NXP Semiconductors be liable for any indirect, incidental, punitive, special or consequential damages (including - without limitation - lost profits, lost savings, business interruption, costs related to the removal or replacement of any products or rework charges) whether or not such damages are based on tort (including negligence), warranty, breach of contract or any other legal theory. Notwithstanding any damages that customer might incur for any reason whatsoever, NXP Semiconductors' aggregate and cumulative liability towards customer for the products described herein shall be limited in accordance with the Terms and conditions of commercial sale of NXP Semiconductors.

Right to make changes - NXP Semiconductors reserves the right to make changes to information published in this document, including without limitation specifications and product descriptions, at any time and without notice. This document supersedes and replaces all information supplied prior to the publication hereof.

Suitability for use - NXP Semiconductors products are not designed, authorized or warranted to be suitable for use in life support, life-critical or safety-critical systems or equipment, nor in applications where failure or malfunction of an NXP Semiconductors product can reasonably be expected to result in personal injury, death or severe property or environmental damage. NXP Semiconductors and its suppliers accept no liability for inclusion and/or use of NXP Semiconductors products in such equipment or applications and therefore such inclusion and/or use is at the customer's own risk.

Applications - Applications that are described herein for any of these products are for illustrative purposes only. NXP Semiconductors makes no representation or warranty that such applications will be suitable for the specified use without further testing or modification. Customers are responsible for the design and operation of their applications and products using NXP Semiconductors products, and NXP Semiconductors accepts no liability for any assistance with applications or customer product design. It is customer's sole responsibility to determine whether the NXP Semiconductors product is suitable and fit for the customer's applications and products planned, as well as for the planned application and use of customer's third party customer(s). Customers should provide appropriate design and operating safeguards to minimize the risks associated with their applications and products. NXP Semiconductors does not accept any liability related to any default, damage, costs or problem which is based on any weakness or default in the customer's applications or products, or the application or use by customer's third party customer(s). Customer is responsible for doing all necessary testing for the customer's applications and products using NXP Semiconductors products in order to avoid a default of the applications and the products or of the application or use by customer's third party customer(s). NXP does not accept any liability in this respect.

6.3 Legal information

Terms and conditions of commercial sale - NXP Semiconductors products are sold subject to the general terms and conditions of commercial sale, as published at http://www.nxp.com/profile/terms, unless otherwise agreed in a valid written individual agreement. In case an individual agreement is concluded, only the terms and conditions of the respective agreement shall apply. NXP Semiconductors hereby expressly objects to applying the customer's general terms and conditions with regard to the purchase of NXP Semiconductors products by customer.

Export control - This document as well as the item(s) described herein may be subject to export control regulations. Export might require a prior authorization from competent authorities.

Evaluation products - This product is provided on an "as is" and "with all faults" basis for evaluation purposes only. NXP Semiconductors, its affiliates and their suppliers expressly disclaim all warranties, whether express, implied or statutory, including but not limited to the implied warranties of non-infringement, merchantability and fitness for a particular purpose. The entire risk as to the quality, or arising out of the use or performance, of this product remains with customer. In no event shall NXP Semiconductors, its affiliates or their suppliers be liable to customer for any special, indirect, consequential, punitive or incidental damages (including without limitation damages for loss of business, business interruption, loss of use, loss of data or information, and the like) arising out the use of or inability to use the product, whether or not based on tort (including negligence), strict liability, breach of contract, breach of warranty or any other theory, even if advised of the possibility of such damages. Notwithstanding any damages that customer might incur for any reason whatsoever (including without limitation, all damages referenced above and all direct or general damages), the entire liability of NXP Semiconductors, its affiliates and their suppliers and customer's exclusive remedy for all of the foregoing shall be limited to actual damages incurred by customer based on reasonable reliance up to the greater of the amount actually paid by customer for the product or five dollars (US$5.00). The foregoing limitations, exclusions and disclaimers shall apply to the maximum extent permitted by applicable law, even if any remedy fails of its essential purpose.

Translations - A non-English (translated) version of a document is for reference only. The English version shall prevail in case of any discrepancy between the translated and English versions.

Security - Customer understands that all NXP products may be subject to unidentified or documented vulnerabilities. Customer is responsible for the design and operation of its applications and products throughout their lifecycles to reduce the effect of these vulnerabilities on customer's applications and products. Customer's responsibility also extends to other open and/or proprietary technologies supported by NXP products for use in customer's applications. NXP accepts no liability for any vulnerability. Customer should regularly check security updates from NXP and follow up appropriately. Customer shall select products with security features that best meet rules, regulations, and standards of the intended application and make the ultimate design decisions regarding its products and is solely responsible for compliance with all legal, regulatory, and security related requirements concerning its products, regardless of any information or support that may be provided by NXP. NXP has a Product Security Incident Response Team (PSIRT) (reachable at PSIRT@nxp.com) that manages the investigation, reporting, and solution release to security vulnerabilities of NXP products.

6.3 Trademarks

Notice: All referenced brands, product names, service names and trademarks are the property of their respective owners.

NXP wordmark and logo are trademarks of NXP B.V.

PDF preview unavailable. Download the PDF instead.

AN12991 Apache FOP Version 2.3

Related Documents

Preview PN7160 Product Quick Start Guide
This document provides a quick start guide for the PN7160, an NFC controller solution with integrated firmware and NCI interface. It covers hardware, antenna, and software integration, along with details on the PN7160 evaluation kit.
Preview NTAG215 NFC Carbon Fiber Cards: Features and Applications
Explore the versatile applications of NTAG215 NFC carbon fiber cards, including toggling WiFi, sharing contacts, NFC payments, and Amiibo games, plus details on the NXP TagInfo app.
Preview Getting Started with NXP-based Wireless Modules on i.MX 8M Quad EVK Running Linux OS
This document details the enabling of wireless solutions on the i.MX 8M Quad evaluation kit, covering the bring-up of Wi-Fi and Bluetooth interfaces for NXP-based wireless modules.
Preview WFA Certification Guide for NXP Wireless Modules on i.MX 8M Quad EVK with Linux OS
This document provides a step-by-step guide for Wi-Fi Alliance (WFA) certification of NXP-based wireless modules on the i.MX 8M Quad EVK running Linux OS. It covers test setup, procedure, and execution for various Wi-Fi features including 802.11ax, 802.11ac, 802.11n, PMF, WPA3, and security vulnerability detection.
Preview i.MX Linux User's Guide: Comprehensive Guide to NXP i.MX Platforms
Explore the i.MX Linux User's Guide for detailed instructions on building, installing, and utilizing the i.MX Linux OS BSP. This guide covers U-Boot bootloader configuration, Linux kernel setup, and leveraging special i.MX platform features for diverse applications.
Preview NXP CUP 2023/2024: Terms and Conditions for Intelligent Robot Racing Challenge
Official terms and conditions for participation in the NXP CUP EMEA 2023/2024, an intelligent robot racing challenge for students, detailing organizer, eligibility, registration, prizes, and data protection.
Preview GUI Guider v1.7.2 User Guide: Develop Embedded GUIs with NXP
Discover the NXP GUI Guider v1.7.2 User Guide, your comprehensive resource for creating graphical user interfaces on embedded systems. Learn about its powerful IDE, drag-and-drop features, extensive widget library, and seamless integration with NXP development tools for MCUs and MPUs.
Preview NXP FRDM-K22F-AGMP03 Sensor Toolbox Development Kit User Manual
User manual for the NXP FRDM-K22F-AGMP03 sensor toolbox development kit, detailing its features, components, hardware, and resources for sensor evaluation and prototyping.