<?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>Wireless MCU中的主题 PN5180 HCE T4T Flow and Code.</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/PN5180-HCE-T4T-Flow-and-Code/m-p/1376321#M12426</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question about the flow of card emulation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Do not point me to the NFC reader library example HCE_T4T, I have PNEV5180 and already know about the existence of that example.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the flow I came up with after going through the example.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; Initialize SPI connection with PN5180&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; Reset the PN5180 IC using RST pin and wait for IDLE IRQ to set, then clear IRQ&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt; Disable EMD in EMD_CONTROL register by using writeRegisterWithAndMask(0xFFFFFFFE)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4.&amp;nbsp;&lt;/STRONG&gt;Switch to IDLE mode -&amp;nbsp;writeRegisterWithAndMask(SYSTEM_CONFIG, 0xFFFFFFF8)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5.&amp;nbsp;&lt;/STRONG&gt;Turn off RF.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;6.&amp;nbsp;&lt;/STRONG&gt;Clear IRQ status - clearIRQStatus(0x000FFFFF);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;7.&amp;nbsp;&lt;/STRONG&gt;Enable RX IRQ&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;8.&amp;nbsp;&lt;/STRONG&gt;Declare 4 byte buffer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;uint8_t buf[4];&lt;/P&gt;&lt;P&gt;buf[0] =&amp;nbsp;0x0B;&amp;nbsp; &lt;EM&gt;SWITCH MODE command&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;buf[1] = 0x02;&amp;nbsp; &lt;EM&gt;Autocoll mode&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;buf[2] = 0x01; &lt;EM&gt;NFC-A masking ,&amp;nbsp;RF technologies&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;buf[3] = 0x02;&amp;nbsp;&lt;EM&gt;Autonomous mode used without entering standby mode,&amp;nbsp;Autocoll parameter&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;transceiveCommand(buf, 4, 0, 0))&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;9.&amp;nbsp;&lt;/STRONG&gt;Now in while loop constantly scan for RX IRQ and wait for it to be set.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;10.&lt;/STRONG&gt; After bringing the phone RX IRQ is being set. reading the RX_STATUS register's first 9 bits it gives us the number of received bytes. which is 2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;11.&amp;nbsp;&lt;/STRONG&gt;Use the ReadData command to read the data into buffer which is - &lt;STRONG&gt;0xE0, 0x80&lt;/STRONG&gt;. After this clear the IRQ_STATUS register&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;12. &lt;/STRONG&gt;Use the SendData command to send the buffer of 0x09 - SendData command, 0x00 - number of valid bits, and 5 bytes of ATS so the buffer looks like &lt;STRONG&gt;{0x09, 0x00,&amp;nbsp;0x05, 0x75, 0x00, 0x88, 0x00}&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;13.&amp;nbsp;&lt;/STRONG&gt;After this wait for the TX IRQ to be set and then wait for RX IRQ to be set ( waiting for select command)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;14.&lt;/STRONG&gt; Once the RX IRQ gets set and when I read the data in it, it returns 0xF0, 0x25, 0xD4. which is garbage value and i think some error occured. I am stuck in this part.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;Again, please don't refer me to the NFC reader library example.&amp;nbsp;&lt;/STRONG&gt;Just please if you know what I am doing wrong just tell me what I am doing wrong in this flow and I will correct it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Nov 2021 12:23:01 GMT</pubDate>
    <dc:creator>tsotnek</dc:creator>
    <dc:date>2021-11-24T12:23:01Z</dc:date>
    <item>
      <title>PN5180 HCE T4T Flow and Code.</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/PN5180-HCE-T4T-Flow-and-Code/m-p/1376321#M12426</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question about the flow of card emulation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Do not point me to the NFC reader library example HCE_T4T, I have PNEV5180 and already know about the existence of that example.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the flow I came up with after going through the example.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; Initialize SPI connection with PN5180&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; Reset the PN5180 IC using RST pin and wait for IDLE IRQ to set, then clear IRQ&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt; Disable EMD in EMD_CONTROL register by using writeRegisterWithAndMask(0xFFFFFFFE)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4.&amp;nbsp;&lt;/STRONG&gt;Switch to IDLE mode -&amp;nbsp;writeRegisterWithAndMask(SYSTEM_CONFIG, 0xFFFFFFF8)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;5.&amp;nbsp;&lt;/STRONG&gt;Turn off RF.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;6.&amp;nbsp;&lt;/STRONG&gt;Clear IRQ status - clearIRQStatus(0x000FFFFF);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;7.&amp;nbsp;&lt;/STRONG&gt;Enable RX IRQ&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;8.&amp;nbsp;&lt;/STRONG&gt;Declare 4 byte buffer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;uint8_t buf[4];&lt;/P&gt;&lt;P&gt;buf[0] =&amp;nbsp;0x0B;&amp;nbsp; &lt;EM&gt;SWITCH MODE command&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;buf[1] = 0x02;&amp;nbsp; &lt;EM&gt;Autocoll mode&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;buf[2] = 0x01; &lt;EM&gt;NFC-A masking ,&amp;nbsp;RF technologies&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;buf[3] = 0x02;&amp;nbsp;&lt;EM&gt;Autonomous mode used without entering standby mode,&amp;nbsp;Autocoll parameter&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;transceiveCommand(buf, 4, 0, 0))&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;9.&amp;nbsp;&lt;/STRONG&gt;Now in while loop constantly scan for RX IRQ and wait for it to be set.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;10.&lt;/STRONG&gt; After bringing the phone RX IRQ is being set. reading the RX_STATUS register's first 9 bits it gives us the number of received bytes. which is 2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;11.&amp;nbsp;&lt;/STRONG&gt;Use the ReadData command to read the data into buffer which is - &lt;STRONG&gt;0xE0, 0x80&lt;/STRONG&gt;. After this clear the IRQ_STATUS register&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;12. &lt;/STRONG&gt;Use the SendData command to send the buffer of 0x09 - SendData command, 0x00 - number of valid bits, and 5 bytes of ATS so the buffer looks like &lt;STRONG&gt;{0x09, 0x00,&amp;nbsp;0x05, 0x75, 0x00, 0x88, 0x00}&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;13.&amp;nbsp;&lt;/STRONG&gt;After this wait for the TX IRQ to be set and then wait for RX IRQ to be set ( waiting for select command)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;14.&lt;/STRONG&gt; Once the RX IRQ gets set and when I read the data in it, it returns 0xF0, 0x25, 0xD4. which is garbage value and i think some error occured. I am stuck in this part.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;Again, please don't refer me to the NFC reader library example.&amp;nbsp;&lt;/STRONG&gt;Just please if you know what I am doing wrong just tell me what I am doing wrong in this flow and I will correct it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 12:23:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/PN5180-HCE-T4T-Flow-and-Code/m-p/1376321#M12426</guid>
      <dc:creator>tsotnek</dc:creator>
      <dc:date>2021-11-24T12:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: PN5180 HCE T4T Flow and Code.</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/PN5180-HCE-T4T-Flow-and-Code/m-p/1376341#M12427</link>
      <description>&lt;P&gt;I am stuck in same problem. i wish someone have done&amp;nbsp; custom CE mode and can help us&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 13:04:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/PN5180-HCE-T4T-Flow-and-Code/m-p/1376341#M12427</guid>
      <dc:creator>shotariusi</dc:creator>
      <dc:date>2021-11-24T13:04:55Z</dc:date>
    </item>
  </channel>
</rss>

