ELECHOUSE OM27160 I2C Board User Guide

July 24, 2024
ELECHOUSE

TESTING GUIDE

ELECHOUSE PN7160 I2C board quick start guide


This guide is based on NXP AN12991

For the following products:
1. ELECHOUSE PN7160 I2C MODULE
2. ELECHOUSE PN7161 I2C MODULE

ELECHOUSE OM27160 I2C Board 0

Quick Startup with Raspberry Pi interface board


3.1 Required items
  • Raspberry Pi [1] running raspbian distribution.
3.2 Hardware setup

ELECHOUSE OM27160 I2C Board 1

Connection

PN7160            ——–Raspberry PI 4
SDA                 #3 SDA
SCL                  #5 SCL
IRQ                  #16 GPIO23
VEN                #18 GPIO24
VDD                #1 3.3V PWR
VANT              #2 OR #4 5V PWR
GND                #6 GND
DWL                #22

3.3 Software setup

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

Below is the step-by-step procedure run from the Raspberry Pi to add software support for PN7160:

3.3.1 Enable I²C interface

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 button

Figure 6.Enabling I²C interface on raspian

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 is connected the PN7160.

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 linux_libnfc-nci/conf/libnfc-nxp.conf file to update 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.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 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 command:
nfcDemoApp –help
For more detailed information about the demo application, but also for additional example applications, please refer to [2].

ELECHOUSE OM27160 I2C Board 3

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals