PN7150 Raspberry Pi SBC Kit Quick Start Guide

Transcription

AN11758PN7150 Raspberry Pi SBC kit quick start guideRev. 1.6 — 14 June 2021347816Application noteDocument informationInformationContentKeywordsOM5579, PN7150, Raspberry Pi, NFC, P2P, card emulation, LinuxAbstractThis document gives a description on how to get started with the OM5579PN7150 NFC Controller SBC Kit on Raspberry Pi platform.

AN11758NXP SemiconductorsPN7150 Raspberry Pi SBC kit quick start guide1Revision historyRevision historyRevDateDescription1.620210614Moved to OM5579 because of OM5578 discontinuation1.520210127Removed Windows IoT support1.420190708Updated Linux demo part with link to instructions1.320180725Updated weblinks1.220170222Updated demo images weblinks1.120160512 Dedicating document to Raspberry Pi platform quick start guidelines Security status changed into COMPANY PUBLIC1.020151210First official release versionAN11758Application noteAll information provided in this document is subject to legal disclaimers.Rev. 1.6 — 14 June 2021347816 NXP B.V. 2021. All rights reserved.2 / 11

AN11758NXP SemiconductorsPN7150 Raspberry Pi SBC kit quick start guide2IntroductionThis document gives a description on how to get started with the OM5579 PN7150 NFCcontroller SBC kit on Raspberry Pi platform. This document provides a step by step guideto the installation procedure of the hardware and the software. Finally, it shows PN7150NFC Controller functionalities through demonstration application.OM5579/PN7150 demonstration kit replaces previous OM5578/PN7150 demonstrationkit now discontinued.2.1 OM5579/PN7150RPI demo kitOM5579/PN7150RPI kit is a high performance fully NFC-compliant expansion boardfor Raspberry Pi (refer to [1] for more details). It meets compliance with reader mode,P2P mode and Card emulation mode standards. The board features an integrated highperformance RF antenna to insure high interoperability level with NFC devices.The kit is comprised of a PN7150 NFC controller board, a dedicated interface board, andan NFC sample card. OM5579/PN7150PN7150 NFC controller board OM29110RPI-BRaspberry Pi Interface BoardNTAG216NFC Sample CardFigure 1. OM5579/PN7150RPI demo kit overviewThe demo kit is fully described in UM10935 document [3].2.2 Linux driver supportPN7150 NFC controller is supported under GNU/Linux system using the NXP Linuxlibnfc-nci software stack delivered through public GitHub repository https://github.com/NXPNFCLinux/linux libnfc-nci (for more details, refer to AN11697 [2]).AN11758Application noteAll information provided in this document is subject to legal disclaimers.Rev. 1.6 — 14 June 2021347816 NXP B.V. 2021. All rights reserved.3 / 11

AN11758NXP SemiconductorsPN7150 Raspberry Pi SBC kit quick start guide3Quick startup on Raspberry Pi3.1 Required items Raspberry Pi [1] Compatible SD or MicroSD card (depending on the Raspberry Pi model) of at least8 Gb memory size Micro USB power supply (5 V / 1A) USB keyboard USB mouse HDMI cable to connect to a Monitor / TV Computer (running Windows, Linux or Mac OS X) only for SD/MicroSD card installation3.2 Hardware setupFirst of all assemble the PN7150 NFC controller board with the Raspberry Pi interfaceboard.Figure 2. OM5579/PN7150RPI demo kit assemblyThen stacked the boards together with the Raspberry Pi according to below guidelines.The Raspberry Pi platforms (new versions) have a 40-pin connector allowing to connectan expansion board. The Raspberry Pi interface board only makes use of the first 26ones for compatibility reason with the previous Raspberry Pi models. Assemble theboards as shown in figure below:AN11758Application noteAll information provided in this document is subject to legal disclaimers.Rev. 1.6 — 14 June 2021347816 NXP B.V. 2021. All rights reserved.4 / 11

AN11758NXP SemiconductorsPN7150 Raspberry Pi SBC kit quick start guideFigure 3. OM5579/PN7150RPI demo kit and Raspberry Pi stacked togetherNote: On the old models (A/B series), first remove the 4 white plastic spacers beforeassembly.3.3 Linux NFC demo application3.3.1 SetupGuidelines to set up this demonstration are provided here 034.Follow the step-by-step procedure to install the demo from Raspbian distribution.3.3.2 Application detailsThe demo application is part of the Linux libnfc-nci stack available on public GitHubrepository https://github.com/NXPNFCLinux/linux libnfc-nci. The related source code canthen be found there (more details in document AN11697 [2]).3.3.3 Starting the applicationOpen a terminal and browse to the Linux libnfc-nci stack directory (refer to Section 2.2 formore details about the Linux NFC software stack). cd /linux libnfc-nciThe application requires parameters to run: ./nfcDemoApp OPTIONS You can get the parameters details by launching the application help menu: ./nfcDemoApp –-helpAN11758Application noteAll information provided in this document is subject to legal disclaimers.Rev. 1.6 — 14 June 2021347816 NXP B.V. 2021. All rights reserved.5 / 11

AN11758NXP SemiconductorsPN7150 Raspberry Pi SBC kit quick start guideFigure 4. Linux demo application parametersThe demo application offers 3 modes of operation: Polling: continuously waiting for a remote NFC device (tag or peer device) anddisplays related information Tag writing: allows writing NDEF content to an NFC tag Device push: allows pushing NDEF content to a remote NFC peer device3.3.3.1 Polling modeWhen in this mode, the application displays information of any discovered NFC tags orremote NFC device.It is reached starting the application with “poll” parameter: ./nfcDemoApp pollFigure 5. Linux demo application polling mode3.3.3.2 Device push modeThis mode allows pushing data to a remote NFC device (e.g. an NFC phone). It isreached using “push” parameter: ./nfcDemoApp push OPTIONS AN11758Application noteAll information provided in this document is subject to legal disclaimers.Rev. 1.6 — 14 June 2021347816 NXP B.V. 2021. All rights reserved.6 / 11

AN11758NXP SemiconductorsPN7150 Raspberry Pi SBC kit quick start guideFigure 6. Linux demo application device push modeYou can get more information about the message format using “-h” or “--help” parameter: ./nfcDemoApp push –-help3.3.3.3 Tag writing modeThis mode allows writing data to an NFC tag. It is reached using “write” parameter: ./nfcDemoApp write OPTIONS Figure 7. Linux demo application tag writing modeYou can get more information about the message format using “-h” or “--help” parameter: ./nfcDemoApp write –-helpAN11758Application noteAll information provided in this document is subject to legal disclaimers.Rev. 1.6 — 14 June 2021347816 NXP B.V. 2021. All rights reserved.7 / 11

AN11758NXP SemiconductorsPN7150 Raspberry Pi SBC kit quick start guide4References[1][2][3]AN11758Application noteThe Raspberry Pi is a low cost, credit-card sized computer that plugs into acomputer monitor or TV, and uses a standard keyboard and mouse. It is a capablelittle device that enables people of all ages to explore computing, and to learn howto program in languages like Scratch and Python. It is capable of doing everythingyou would expect a desktop computer to do, from browsing the Internet and playinghigh-definition video, to making spreadsheets, word-processing, and playing games.For more information visit https://www.raspberrypi.org/AN11697 PN71x0 Linux software stack integration guidelines: 97.pdfUM10935 PN7150 NFC controller SBC kit user manual: All information provided in this document is subject to legal disclaimers.Rev. 1.6 — 14 June 2021347816 NXP B.V. 2021. All rights reserved.8 / 11

AN11758NXP SemiconductorsPN7150 Raspberry Pi SBC kit quick start guide5Legal informationExport control — This document as well as the item(s) described hereinmay be subject to export control regulations. Export might require a priorauthorization from competent authorities.5.1 DefinitionsDraft — A draft status on a document indicates that the content is stillunder internal review and subject to formal approval, which may resultin modifications or additions. NXP Semiconductors does not give anyrepresentations or warranties as to the accuracy or completeness ofinformation included in a draft version of a document and shall have noliability for the consequences of use of such information.5.2 DisclaimersLimited warranty and liability — Information in this document is believedto be accurate and reliable. However, NXP Semiconductors does notgive any representations or warranties, expressed or implied, as to theaccuracy or completeness of such information and shall have no liabilityfor the consequences of use of such information. NXP Semiconductorstakes no responsibility for the content in this document if provided by aninformation source outside of NXP Semiconductors. In no event shall NXPSemiconductors be liable for any indirect, incidental, punitive, special orconsequential damages (including - without limitation - lost profits, lostsavings, business interruption, costs related to the removal or replacementof any products or rework charges) whether or not such damages are basedon tort (including negligence), warranty, breach of contract or any otherlegal theory. Notwithstanding any damages that customer might incur forany reason whatsoever, NXP Semiconductors’ aggregate and cumulativeliability towards customer for the products described herein shall be limitedin accordance with the Terms and conditions of commercial sale of NXPSemiconductors.Right to make changes — NXP Semiconductors reserves the right tomake changes to information published in this document, including withoutlimitation specifications and product descriptions, at any time and withoutnotice. This document supersedes and replaces all information supplied priorto 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 orsafety-critical systems or equipment, nor in applications where failure ormalfunction of an NXP Semiconductors product can reasonably be expectedto result in personal injury, death or severe property or environmentaldamage. NXP Semiconductors and its suppliers accept no liability forinclusion and/or use of NXP Semiconductors products in such equipment orapplications and therefore such inclusion and/or use is at the customer’s ownrisk.Applications — Applications that are described herein for any of theseproducts are for illustrative purposes only. NXP Semiconductors makesno representation or warranty that such applications will be suitablefor the specified use without further testing or modification. Customersare responsible for the design and operation of their applications andproducts using NXP Semiconductors products, and NXP Semiconductorsaccepts no liability for any assistance with applications or customer productdesign. It is customer’s sole responsibility to determine whether the NXPSemiconductors product is suitable and fit for the customer’s applicationsand products planned, as well as for the planned application and use ofcustomer’s third party customer(s). Customers should provide appropriatedesign and operating safeguards to minimize the risks associated withtheir applications and products. NXP Semiconductors does not accept anyliability related to any default, damage, costs or problem which is basedon any weakness or default in the customer’s applications or products, orthe application or use by customer’s third party customer(s). Customer isresponsible for doing all necessary testing for the customer’s applicationsand products using NXP Semiconductors products in order to avoid adefault of the applications and the products or of the application or use bycustomer’s third party customer(s). NXP does not accept any liability in thisrespect.Evaluation products — This product is provided on an “as is” and “with allfaults” basis for evaluation purposes only. NXP Semiconductors, its affiliatesand their suppliers expressly disclaim all warranties, whether express,implied or statutory, including but not limited to the implied warranties ofnon-infringement, merchantability and fitness for a particular purpose. Theentire risk as to the quality, or arising out of the use or performance, of thisproduct remains with customer. In no event shall NXP Semiconductors, itsaffiliates or their suppliers be liable to customer for any special, indirect,consequential, punitive or incidental damages (including without limitationdamages for loss of business, business interruption, loss of use, loss ofdata or information, and the like) arising out the use of or inability to usethe product, whether or not based on tort (including negligence), strictliability, breach of contract, breach of warranty or any other theory, even ifadvised of the possibility of such damages. Notwithstanding any damagesthat customer might incur for any reason whatsoever (including withoutlimitation, all damages referenced above and all direct or general damages),the entire liability of NXP Semiconductors, its affiliates and their suppliersand customer’s exclusive remedy for all of the foregoing shall be limited toactual damages incurred by customer based on reasonable reliance up tothe greater of the amount actually paid by customer for the product or fivedollars (US 5.00). The foregoing limitations, exclusions and disclaimers shallapply to the maximum extent permitted by applicable law, even if any remedyfails of its essential purpose.Translations — A non-English (translated) version of a document is forreference only. The English version shall prevail in case of any discrepancybetween the translated and English versions.Security — Customer understands that all NXP products may be subjectto unidentified or documented vulnerabilities. Customer is responsiblefor the design and operation of its applications and products throughouttheir lifecycles to reduce the effect of these vulnerabilities on customer’sapplications and products. Customer’s responsibility also extends to otheropen and/or proprietary technologies supported by NXP products for usein customer’s applications. NXP accepts no liability for any vulnerability.Customer should regularly check security updates from NXP and follow upappropriately. Customer shall select products with security features that bestmeet rules, regulations, and standards of the intended application and makethe ultimate design decisions regarding its products and is solely responsiblefor compliance with all legal, regulatory, and security related requirementsconcerning its products, regardless of any information or support that maybe 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.5.3 LicensesPurchase of NXP ICs with NFC technologyPurchase of an NXP Semiconductors IC that complies with one of theNear Field Communication (NFC) standards ISO/IEC 18092 and ISO/IEC 21481 does not convey an implied license under any patent rightinfringed by implementation of any of those standards. Purchase of NXPSemiconductors IC does not include a license to any NXP patent (or otherIP right) covering combinations of those products with other products,whether hardware or software.5.4 TrademarksNotice: All referenced brands, product names, service names andtrademarks are the property of their respective owners.NXP — wordmark and logo are trademarks of NXP B.V.AN11758Application noteAll information provided in this document is subject to legal disclaimers.Rev. 1.6 — 14 June 2021347816 NXP B.V. 2021. All rights reserved.9 / 11

AN11758NXP SemiconductorsPN7150 Raspberry Pi SBC kit quick start guideFiguresFig. 1.Fig. 2.Fig. 3.OM5579/PN7150RPI demo kit overview . 3OM5579/PN7150RPI demo kit assembly . 4OM5579/PN7150RPI demo kit andRaspberry Pi stacked together .5AN11758Application noteFig. 4.Fig. 5.Fig. 6.Fig. 7.Linux demo application parameters . 6Linux demo application polling mode . 6Linux demo application device push mode .7Linux demo application tag writing mode . 7All information provided in this document is subject to legal disclaimers.Rev. 1.6 — 14 June 2021347816 NXP B.V. 2021. All rights reserved.10 / 11

AN11758NXP SemiconductorsPN7150 Raspberry Pi SBC kit quick start 3.13.3.3.23.3.3.345Revision history . 2Introduction . 3OM5579/PN7150RPI demo kit . 3Linux driver support .3Quick startup on Raspberry Pi . 4Required items . 4Hardware setup . 4Linux NFC demo application . 5Setup .5Application details .5Starting the application . 5Polling mode .6Device push mode .6Tag writing mode . 7References . 8Legal information . 9Please be aware that important notices concerning this document and the product(s)described herein, have been included in section 'Legal information'. NXP B.V. 2021.All rights reserved.For more information, please visit: http://www.nxp.comFor sales office addresses, please send an email to: salesaddresses@nxp.comDate of release: 14 June 2021Document identifier: AN11758Document number: 347816

PN7150 Raspberry Pi SBC kit quick start guide 3 Quick startup on Raspberry Pi 3.1 Required items Raspberry Pi [1] Compatible SD or MicroSD card (depending on the Raspberry Pi model) of at least 8 Gb memory size Micro USB power supply (5 V / 1A) USB keybo