Integrating NFC with the NXP PN7150 - Review

Table of contents

RoadTest: Integrating NFC with the NXP PN7150

Author: Attila Tőkés

Creation date:

Evaluation Type: Development Boards & Tools

Did you receive all parts the manufacturer stated would be included in the package?: True

What other parts do you consider comparable to this product?: NXP PN532 NXP MFRC522

What were the biggest problems encountered?: The RoadTest kit was unusable, because the FRDM-KW41Z boards were a wrong revision. On the software side there is no proper Aduino support, and were unable to contact NXP for help.

Detailed Review:

Hi Element14 Comunity,

 

Here is a little bit incomplete and little bit late RoadTest of the NXP PN7150 NFC module.

 

The initial idea of this Road Test was to do a practical comparison between to popular Arduino compatible NFC modules:

  • NXP PN532
  • NXP MFRC522

 

and the NXP PN7150 NFC module.

 

Unfortunately, I ended up wasting a lot of time to get the NXP PN7150 work with Arduino, so didn't had to much time to do too much tests.

 

Road Test Kit


The Road Test hardware looked promising.

We got:

  • an NXP PN7150 NFC module with Arduino compatible headers
  • a NFC Sample Card
  • 2 x  FRDM-KW41Z boards

 

{gallery} Road Test Kit

 

 

IMAGE TITLE: THEN IMAGE DESCRIPTION

IMAGE TITLE: THEN IMAGE DESCRIPTION

IMAGE TITLE: THEN IMAGE DESCRIPTION

 

 

Theory

 

Here is some info extracted from the datasheet of the three modules:

 

NXP PN7150

NXP PN532

NXP MFRC522
RF protocols / modes
  • NFCIP-1, NFCIP-2
  • ISO/IEC 14443A, ISO/IEC 14443B PICC, NFC Forum T4T
  • NFC Forum T3T
  • ISO/IEC 14443A, ISO/IEC 14443B PCD
  • FeliCa PCD mode
  • MIFARE Classic PCD encryption mechanism (MIFARE Classic 1K/4K)
  • NFC Forum tag 1 to 5 (MIFARE Ultralight, Jewel, Open FeliCa tag, MIFARE
  • DESFire)
  • ISO/IEC 15693/ICODE VCD mode
  • ISO/IEC 14443A/MIFARE Reader/Writer
  • FeliCa Reader/Writer
  • ISO/IEC 14443B Reader/Writer
  • ISO/IEC 14443A/MIFARE Card MIFARE Classic 1K or MIFARE Classic 4K card emulation mode
  • FeliCa Card emulation
  • ISO/IEC 18092, ECMA 340 Peer-to-Peer
  • MIFARE Mini
  • MIFARE 1K / 4K
  • MIFARE Ultralight
  • MIFARE DESFire EV1
  • MIFARE Plus RF
Host Interfaces
  • NCI protocol interface according to NFC Forum standardization
  • I2C-bus High-speed mode
  • SPI
  • I2C
  • High Speed UART (HSU)
  • SPI
  • I2C
  • RS232
Supply Voltage
  • 2.7 - 5.5 V
  • 2.7 - 5.5 V
  • 2.7 - 3.6 V
Power consumption
  • hard power down state: 10-14 μA
  • stand by state: 20 μA
  • monitor state: 14 μA
  • low-power polling loop: 150 μA
  • PCD mode (at typical 3 V): 190 mA
  • continuous total power dissipation: 420 mW (max)
  • hard power down state: 2 μA
  • soft power down state: 45 μA
  • continuous total power dissipation: 0.5W (max)
  • hard power down state: 5 μA
  • soft power down state: 10 μA
  • total power dissipation: 200 mW

 

We can see that the NXP PN7150 is much more superior to the, NXP PN532 and NXP MFRC522 modules. It support the latest NFC protocols, support the standardized NCI host protocol and claims to have advanced lower power mode pooling.

Practice

 

Getting the PN7150 module to work was much trickier then I expected.

 

I started working with the hardware a little bit late, so luckily the other three road testers, , and found and example code for the PN7150 module, using the FRDM-KW41Z board provided for this road test:

NXP BLE-NFC Bridge Demonstration for IoT Use Cases

 

Not so luckily, they also found out that the FRDM-KW41Z provided in the road test is and older revision, and will not work with the PN7150 without some nasty hardware hacking:
https://www.element14.com/community/roadTests/2025#comment-151184

 

At this point I decided to not to bother with the FRDM-KW41Z board, but to use an Arduino/Genuino 101.

 

There were two option to get PN7150 working with the Arduino/Genuino:

  • the ThomasBuhot/arduino-nfc Arduino library originally written for the NXP PN7120 module
  • porting the official (?) PN7150 library from the above example project to Arduino

 

First, I tried the ThomasBuhot/arduino-nfc library, but encountered some problems:

https://github.com/ThomasBuhot/arduino-nfc/issues/2

 

Next, I tried to port the PN7150 library from the MCUXpresso to Arduino. This looked promising, as I got the NCI communication working.

But, then the
example fails at certain step of the configuration phase (NxpNci_ConfigureSettings):

#if NXP_CORE_CONF_EXTN

        if (sizeof(NxpNci_CORE_CONF_EXTN) != 0)

        {

            isResetRequired = true;

            NxpNci_HostTransceive(NxpNci_CORE_CONF_EXTN, sizeof(NxpNci_CORE_CONF_EXTN), Answer, sizeof(Answer), &AnswerSize);

            if ((Answer[0] != 0x40) || (Answer[1] != 0x02) || (Answer[3] != 0x00) || (Answer[4] != 0x00)) {

                serial_print("ext 2 failed");       <-- fails here, the PN7150 returns 0x0 0x0 0x0

                return NXPNCI_ERROR;

            }

        }

#endif

Note: if anyone is interested, the code is attached as

 

 

Both the encountered problems were at the NFC Controller Interface (NCI) level. Unfortunately, because the NCI specs are paid (~$600), it's very hard for a maker to investigate these kind of problems.

 

At this point, Randall Scasny contacted NXP with the problem I encountered. But, we got no feedback so far.

 

Luckily, two GitHub users: copercini and timapus figured out how to the ThomasBuhot/arduino-nfc library working with the PN7150.

 

Using this, I was able to read several NFC / RFID cards and tags. The NFC-TagDetect.zip attachment contains the Arduino sketch used.

 

I wanted to do more tests with the PN7150, but unfortunately getting the module working already took too much more time than I planned to allocate to this RoadTest

 

Conclusion

 

Specs wise the NXP PN7150 looks like a very promising board, but it lacks for proper support for Arduino like boards.

The fact that NXP provided a Road Test kit that does not really works and they NXP provided no support with investigating the problem, is also a little bit strange.

The good part is that ultimately with support of the maker community we got the working Arduino library for the PN7150. This means we can actually use the board in project.

 

Cheers,

Attila

Anonymous