<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>NFC中的主题 PN5180 - Raspberry Pi Initialization</title>
    <link>https://community.nxp.com/t5/NFC/PN5180-Raspberry-Pi-Initialization/m-p/1186968#M7903</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to drive a PN5180 from a raspberry Pi, using the library, but I'm getting the following error and am unable to figure out the reason. I triple checked the build instruction in the PDF and the connections to the board.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;pi@raspberrypi:~/SW369321/_build/Examples/NfcrdlibEx1_BasicDiscoveryLoop $ ./NfcrdlibEx1_BasicDiscoveryLoop

 BasicDiscoveryLoop Example:

Line: 123   Error - (0xF181) has occurred in NFCLIB&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the error both with board plugged to the RPi, and I also tested with nothing plugged in to see if a different error is presented.&lt;/P&gt;&lt;P&gt;It seems that something is wrong in the interaction with the RPi when using the board config for the PN5180, as opposed to the board config for the RC663; as you can see in the screenshots below, when compiling against the board config for the RC663 I can see the library tries to initialize the board via SPI, whereas for the board config for the PN5180 there is no communication at all on the SPI bus.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RC663 Board Config" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/130696iDE5AD18022F120C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="logic_RC663.png" alt="RC663 Board Config" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;RC663 Board Config&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PN5180 Board Config" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/130697i625D5131D9166D16/image-size/large?v=v2&amp;amp;px=999" role="button" title="logic_PN5180.png" alt="PN5180 Board Config" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;PN5180 Board Config&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I did enable SPI as requested by the manual, is there anything else that needs to be changed on the RPi, or maybe a known incompatibility with the version of Raspbian and the kernel I'm running?&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;This is on a clean RPi install with version as below:&lt;/P&gt;&lt;LI-SPOILER&gt;pi@raspberrypi:~/SW369321/_build/Examples/NfcrdlibEx1_BasicDiscoveryLoop $ lsb_release -a&lt;BR /&gt;No LSB modules are available.&lt;BR /&gt;Distributor ID: Raspbian&lt;BR /&gt;Description: Raspbian GNU/Linux 10 (buster)&lt;BR /&gt;Release: 10&lt;BR /&gt;Codename: buster&lt;BR /&gt;pi@raspberrypi:~/SW369321/_build/Examples/NfcrdlibEx1_BasicDiscoveryLoop $ uname -r&lt;BR /&gt;5.4.51-v7+&lt;/LI-SPOILER&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 21 Nov 2020 21:29:52 GMT</pubDate>
    <dc:creator>mooncake</dc:creator>
    <dc:date>2020-11-21T21:29:52Z</dc:date>
    <item>
      <title>PN5180 - Raspberry Pi Initialization</title>
      <link>https://community.nxp.com/t5/NFC/PN5180-Raspberry-Pi-Initialization/m-p/1186968#M7903</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to drive a PN5180 from a raspberry Pi, using the library, but I'm getting the following error and am unable to figure out the reason. I triple checked the build instruction in the PDF and the connections to the board.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;pi@raspberrypi:~/SW369321/_build/Examples/NfcrdlibEx1_BasicDiscoveryLoop $ ./NfcrdlibEx1_BasicDiscoveryLoop

 BasicDiscoveryLoop Example:

Line: 123   Error - (0xF181) has occurred in NFCLIB&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the error both with board plugged to the RPi, and I also tested with nothing plugged in to see if a different error is presented.&lt;/P&gt;&lt;P&gt;It seems that something is wrong in the interaction with the RPi when using the board config for the PN5180, as opposed to the board config for the RC663; as you can see in the screenshots below, when compiling against the board config for the RC663 I can see the library tries to initialize the board via SPI, whereas for the board config for the PN5180 there is no communication at all on the SPI bus.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RC663 Board Config" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/130696iDE5AD18022F120C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="logic_RC663.png" alt="RC663 Board Config" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;RC663 Board Config&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PN5180 Board Config" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/130697i625D5131D9166D16/image-size/large?v=v2&amp;amp;px=999" role="button" title="logic_PN5180.png" alt="PN5180 Board Config" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;PN5180 Board Config&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I did enable SPI as requested by the manual, is there anything else that needs to be changed on the RPi, or maybe a known incompatibility with the version of Raspbian and the kernel I'm running?&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;This is on a clean RPi install with version as below:&lt;/P&gt;&lt;LI-SPOILER&gt;pi@raspberrypi:~/SW369321/_build/Examples/NfcrdlibEx1_BasicDiscoveryLoop $ lsb_release -a&lt;BR /&gt;No LSB modules are available.&lt;BR /&gt;Distributor ID: Raspbian&lt;BR /&gt;Description: Raspbian GNU/Linux 10 (buster)&lt;BR /&gt;Release: 10&lt;BR /&gt;Codename: buster&lt;BR /&gt;pi@raspberrypi:~/SW369321/_build/Examples/NfcrdlibEx1_BasicDiscoveryLoop $ uname -r&lt;BR /&gt;5.4.51-v7+&lt;/LI-SPOILER&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 21:29:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN5180-Raspberry-Pi-Initialization/m-p/1186968#M7903</guid>
      <dc:creator>mooncake</dc:creator>
      <dc:date>2020-11-21T21:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: PN5180 - Raspberry Pi Initialization</title>
      <link>https://community.nxp.com/t5/NFC/PN5180-Raspberry-Pi-Initialization/m-p/1228881#M8179</link>
      <description>&lt;P&gt;I have exactly the same issue (except for error happening on line 135) and I'd be interested to know how did you manage to solve it.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Official response from NXP support is welcome too.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 16:11:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN5180-Raspberry-Pi-Initialization/m-p/1228881#M8179</guid>
      <dc:creator>Seagull_Island</dc:creator>
      <dc:date>2021-02-09T16:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: PN5180 - Raspberry Pi Initialization</title>
      <link>https://community.nxp.com/t5/NFC/PN5180-Raspberry-Pi-Initialization/m-p/1231133#M8197</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I could not solve it unfortunately, I reverted to writing my own library in python (&lt;A href="https://github.com/fservida/pyPN5180" target="_blank"&gt;https://github.com/fservida/pyPN5180&lt;/A&gt;) but it is a very rough attempt at just getting the UID from a card; it works sufficiently for my application so I did not dig further. Feel free to try it out, and maybe use it as a base for more functionality.&lt;/P&gt;&lt;P&gt;I'd also be very interested in an official answer from NXP about that.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 18:29:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN5180-Raspberry-Pi-Initialization/m-p/1231133#M8197</guid>
      <dc:creator>mooncake</dc:creator>
      <dc:date>2021-02-15T18:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: PN5180 - Raspberry Pi Initialization</title>
      <link>https://community.nxp.com/t5/NFC/PN5180-Raspberry-Pi-Initialization/m-p/1273140#M8505</link>
      <description>&lt;P&gt;I also have the same problem.&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;EM&gt;DiscoveryLoop Example:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Line: 135 Error - (0xF181) has occurred in NFCLIB&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 06 May 2021 15:39:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN5180-Raspberry-Pi-Initialization/m-p/1273140#M8505</guid>
      <dc:creator>Draxter</dc:creator>
      <dc:date>2021-05-06T15:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: PN5180 - Raspberry Pi Initialization</title>
      <link>https://community.nxp.com/t5/NFC/PN5180-Raspberry-Pi-Initialization/m-p/2030093#M12524</link>
      <description>&lt;P&gt;For anyone facing this issue as well, I was able to modify it and run the first discovery loop example on my rpi 02w and my pn5180.&lt;/P&gt;&lt;P&gt;In &lt;FONT face="courier new,courier"&gt;Platform/DAL/boards/Board_PiPn5180.h &lt;/FONT&gt;you should change the gpio pins to match your pi's corresponding gpio numbers in the sysfs interface.&lt;/P&gt;&lt;P&gt;For my pi, I had to offset all of them by 512 because that was the base-N that was in my gpiochip (per &lt;A href="https://www.kernel.org/doc/Documentation/gpio/sysfs.txt" target="_blank"&gt;https://www.kernel.org/doc/Documentation/gpio/sysfs.txt&lt;/A&gt;) (you can find it by seeing the number after gpiochip in /sys/class/gpio/gpiochipX)&lt;/P&gt;&lt;P&gt;So the line&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;#define PHDRIVER_PIN_RESET &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;16&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;becomes&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;#define PHDRIVER_PIN_RESET &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;512+16&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;and so on for the rest of the pins.&lt;/P&gt;&lt;P&gt;I also commented out &lt;SPAN&gt;#define PHDRIVER_LINUX_KERNEL_SPI&lt;/SPAN&gt; and uncommented &lt;SPAN&gt;#define PHDRIVER_LINUX_USER_SPI to disable the bal driver. yes it's slower but the latest commit for the driver is from 9 years ago, so that's the best one can do.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I attached a diff file for my raspberry pi, but it might not work on yours because of the different gpio base number, you can refer to it for the changes in the code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jan 2025 22:38:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN5180-Raspberry-Pi-Initialization/m-p/2030093#M12524</guid>
      <dc:creator>kquote03</dc:creator>
      <dc:date>2025-01-18T22:38:36Z</dc:date>
    </item>
  </channel>
</rss>

