PN7150 BeagleBone Black SBC Kit Quick Start Guide - NXP

Transcription

AN11842PN7150 BeagleBone Black SBC kit quick start guideRev. 1.3 — 14 June 2021373113Application noteCOMPANY PUBLICDocument informationInformationContentKeywordsOM5579, PN7150, BeagleBone, NFC, P2P, card emulation, Linux, AndroidAbstractThis document gives a description on how to get started with the OM5579PN7150 NFC controller SBC kit on BeagleBone Black platform.

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guide1Revision historyRevision historyRevDateDescription1.320210614Moved to OM5579 because of OM5578 discontinuation1.220180725Updated weblinks1.120170222Updated demo images weblinks1.020150518First official release versionAN11842Application noteCOMPANY PUBLICAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.2 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guide2IntroductionThis document gives a description on how to get started with the OM5579 PN7150 NFCcontroller SBC kit on BeagleBone Black platform. This document provides a step by stepguide to the installation procedure of the hardware and the software. Finally, it showsPN7150 NFC controller functionalities through demonstration application.OM5579/PN7150 demonstration kit replaces previous OM5578/PN7150 demonstrationkit now discontinued.2.1 OM5579/PN7150BBB demo kitOM5579/PN7150BBB kit is a high performance fully NFC-compliant expansion board forBeagleBone Black (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 demo kit is comprised of a PN7150 NFC controller board, a dedicated interfaceboard, and an NFC sample card. OM5579/PN7150PN7150 NFC controller board OM29110BBB-BBeagleBone Interface BoardNTAG216NFC Sample CardFigure 1. OM5579/PN7150BBB kit overviewThe demo kit is fully described in UM10935 document [5].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]).2.3 Android driver supportPN7150 NFC controller is supported from the official Android Open Source Project (referto [4] for more details) with the addition of dedicated patches (refer to AN11690 [3]).AN11842Application noteCOMPANY PUBLICAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.3 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guide3Quick startup on BeagleBone3.1 Required items BeagleBone Black [1] MicroSD card of at least 4 Gb (8 Gb for Android demo image) 5 V adapter to power the BeagleBone (Note: Micro USB cable does not provide the5 V required by the antenna supply of the OM5579/PN7150BBB board. Without it,no RF field can be generated by the PN7150). USB keyboard USB mouse USB Hub to connect both mouse and keyboard to the BeagleBone HDMI cable to connect to a Monitor / TV Computer (running Windows, Linux or Mac OS X) for MicroSD card installation BeagleBone demo image file (see [5])3.2 Hardware setupFirst of all, assemble the PN7150 NFC controller board with the BeagleBone interfaceboard.Figure 2. OM5579/PN7150BBB demo kit assemblyThen stacked together the boards with the BeagleBone.AN11842Application noteCOMPANY PUBLICAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.4 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guideFigure 3. OM5579/PN7150BBB and BeagleBone Black stacked together3.3 Software setupPrepare a MicroSD card, with the downloaded BeagleBone demo image (see [5]),following the installation guidelines. First extract the “.img” file from the archive, then flashit on the microSD card according to below guidelines.3.3.1 On WindowsInsert the MicroSD card into your computer (note the device drive letter), and usingWin32 Disk Imager, write the image into it:Figure 4. Win32 Disk ImagerAN11842Application noteCOMPANY PUBLICAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.5 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guide3.3.2 On LinuxInsert the MicroSD card into your computer and determine the device node assigned to it(ignore the device number; e.g. /dev/sdb, not sdb1): sudo dmesg tail -20 sudo dmesg [95300.848154]pci[95300.983859]Product 6d00[95300.983872]SerialNumber 984593][95300.984882][95301.985555]0 ANSI: 0 CCS[95301.986856][95301.988277]tail -20usb 2-1: new high-speed USB device number 33 using ehciusb 2-1: New USB device found, idVendor 14cd, idusb 2-1: New USB device strings: Mfr 1, Product 3,usb 2-1: Product: USB 2.0 SD/MMC READERusb 2-1: Manufacturer: SDMMC M121usb 2-1: SerialNumber: 800340070270usb-storage 2-1:1.0: USB Mass Storage device detectedscsi18 : usb-storage 2-1:1.0scsi 18:0:0:0: Direct-Access USB 2.0 SD/MMC Reader PQ:sd 18:0:0:0: Attached scsi generic sg2 type 0sd 18:0:0:0: [sdb] Attached SCSI removable diskFigure 5. Identifying device number under LinuxThen, unmount the device node using following command:sudo umount /dev/devicenodeFinally flash the image to the device node using following command:sudo dd if path to image file.img of /dev/devicenode bs 1M3.3.3 On MAC OS XUsing PiFiller (see ling-operatingsystems/mac-os-x), select the image file then insert the MicroSD card into your computerto flash it.3.4 Linux NFC demo application3.4.1 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.4.2 Starting Linux NFC demoInsert the MicroSD card in the BeagleBone. Connect HDMI Display, mouse and keyboardvia the USB Hub. Finally supply the BeagleBone using 5 V adapter.AN11842Application noteCOMPANY PUBLICAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.6 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guideThe BeagleBone boots and displays the bone-debian GUI:Figure 6. Bone-debian GUIOpen 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 –-helpFigure 7. Linux demo application commandsThe demo application offers 3 modes of operation:AN11842Application noteCOMPANY PUBLICAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.7 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guide 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.4.2.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 8. Linux demo application polling mode3.4.2.2 Tag writing modeThis mode allows writing data to an NFC tag. It is reached using “write” parameter: ./nfcDemoApp write OPTIONS AN11842Application noteCOMPANY PUBLICAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.8 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guideFigure 9. Linux demo application tag writing modeYou can get more information about the message format using “-h” or “--help” parameter: ./nfcDemoApp write –-help3.4.3 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 Figure 10. Linux demo application device push modeYou can get more information about the message format using “-h” or “--help” parameter: ./nfcDemoApp push –-helpAN11842Application noteCOMPANY PUBLICAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.9 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guide3.5 Android NFC demoInsert the MicroSD card in the BeagleBone. Connect HDMI Display, mouse and keyboardvia the USB Hub. Finally supply the BeagleBone using 5 V adapter.After a few seconds Android boots up, NFC is then running, ready to read tags or interactwith remote NFC device (e.g. NFC phone).Figure 11. Android home screenYou can enable/disable the NFC function via “Settings/Wireless & Network/More ”Figure 12. Android “Setting/Wireless&Network” menuUsing provided NXP TagInfo and NXP TagWriter applications you can get informationfrom discovered tag and write content.AN11842Application noteCOMPANY PUBLICAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.10 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guideFigure 13. Android applicationsFigure 14. Android TagInfo applicationAN11842Application noteCOMPANY PUBLICAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.11 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guideFigure 15. Android TagWriter applicationAN11842Application noteCOMPANY PUBLICAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.12 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guide4References[1][2][3][4][5]AN11842Application noteCOMPANY PUBLICBeagleBone is a low-power open source hardware single-board credit-card-sizedLinux computer that connects to the Internet and runs software such as Androidand Ubuntu. With plenty of I/O and processing power for real-time analysis providedby a 720 MHz Arm processor-based SoC (System on Chip), BeagleBone can becomplemented with cape plug-in boards to augment functionality.For more information visit http://beagleboard.org/boneAN11697 PN71xx Linux software stack integration guidelines: http://www.nxp.com/documents/application note/AN11697.pdfAN11690 NXPNCI Android porting guidelines: http://www.nxp.com/documents/application note/AN11690.pdfAndroid is an open source software stack for a wide range of mobile devices and acorresponding open source project led by Google.For more information visit https://source.android.com/BeagleBone Linux demo image: 50S BBB Linux demo v1.2.zipBeagleBone Android KitKat demo image: 150S BBB AndroidKitKat demo v1.0.zipAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.13 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black 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.AN11842Application noteCOMPANY PUBLICAll information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.14 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guideAMBA, Arm, Arm7, Arm7TDMI, Arm9, Arm11, Artisan, big.LITTLE,Cordio, CoreLink, CoreSight, Cortex, DesignStart, DynamIQ, Jazelle,Keil, Mali, Mbed, Mbed Enabled, NEON, POP, RealView, SecurCore,Socrates, Thumb, TrustZone, ULINK, ULINK2, ULINK-ME, ULINK-PLUS,AN11842Application noteCOMPANY PUBLICULINKpro, µVision, Versatile — are trademarks or registered trademarksof Arm Limited (or its subsidiaries) in the US and/or elsewhere. The relatedtechnology may be protected by any or all of patents, copyrights, designsand trade secrets. All rights reserved.All information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.15 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start guideFiguresFig. 1.Fig. 2.Fig. 3.Fig. 4.Fig. 5.Fig. 6.Fig. 7.OM5579/PN7150BBB kit overview .3OM5579/PN7150BBB demo kit assembly . 4OM5579/PN7150BBB and BeagleBoneBlack stacked together .5Win32 Disk Imager .5Identifying device number under Linux .6Bone-debian GUI . 7Linux demo application commands . 7AN11842Application noteCOMPANY PUBLICFig. 8.Fig. 9.Fig. 10.Fig. 11.Fig. 12.Fig. 13.Fig. 14.Fig. 15.Linux demo application polling mode . 8Linux demo application tag writing mode . 9Linux demo application device push mode .9Android home screen . 10Android “Setting/Wireless&Network” menu . 10Android applications . 11Android TagInfo application . 11Android TagWriter application . 12All information provided in this document is subject to legal disclaimers.Rev. 1.3 — 14 June 2021373113 NXP B.V. 2021. All rights reserved.16 / 17

AN11842NXP SemiconductorsPN7150 BeagleBone Black SBC kit quick start .43.4.13.4.23.4.2.13.4.2.23.4.33.545Revision history . 2Introduction . 3OM5579/PN7150BBB demo kit . 3Linux driver support .3Android driver support . 3Quick startup on BeagleBone .4Required items . 4Hardware setup . 4Software setup .5On Windows . 5On Linux . 6On MAC OS X .6Linux NFC demo application . 6Application details .6Starting Linux NFC demo . 6Polling mode .8Tag writing mode . 8Device push mode .9Android NFC demo .10References . 13Legal information . 14Please 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: AN11842Document number: 373113

PN7150 BeagleBone Black SBC kit quick start guide 3 Quick startup on BeagleBone 3.1 Required items BeagleBone Black [1] MicroSD card of at least 4 Gb (8 Gb for Android demo image) 5 V adapter to power the BeagleBone (Note: Micro USB cable does not provide the 5 V required by the antenna supply of the OM5579/PN7150BBB board. Without it,