<?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>topic Why do I get a NACK when reading the response from the PN7150 device? in NFC</title>
    <link>https://community.nxp.com/t5/NFC/Why-do-I-get-a-NACK-when-reading-the-response-from-the-PN7150/m-p/1514783#M9631</link>
    <description>&lt;P&gt;Hi.&lt;BR /&gt;&lt;BR /&gt;I'm initializing the PN7150 device with a CORE_RESET_CMD command as shown in the following image:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dominusdrr_0-1661962793209.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/192004i4218869E1728B231/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dominusdrr_0-1661962793209.png" alt="dominusdrr_0-1661962793209.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I wait for the IRQ bit to go to logical 1 to try to read the response and I get the following:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dominusdrr_1-1661962929487.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/192005iDB7871D395F3DF05/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dominusdrr_1-1661962929487.png" alt="dominusdrr_1-1661962929487.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It can be seen that a NACK appears in the last byte, so I cannot continue to the next step, which is to obtain the notification.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you analyze the response frame, it appears to be correct:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;0x51&lt;/STRONG&gt;&amp;nbsp;is the control byte where the I2C device address is and the R/W bit is at logical 1 (read)&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;0x40&lt;/STRONG&gt; is the first byte of the NCI specification and corresponds to the &lt;STRONG&gt;MT value&lt;/STRONG&gt; which in this case means response to the previous command&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;0x00&lt;/STRONG&gt; is the &lt;STRONG&gt;OID&lt;/STRONG&gt; and it seems to me that it must be the same value of the sent command.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;0x03&lt;/STRONG&gt; is the length of the payload bytes&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0x00&lt;/STRONG&gt; corresponds to the &lt;STRONG&gt;Status&lt;/STRONG&gt; and means STATUS_OK&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0x11&lt;/STRONG&gt; is the &lt;STRONG&gt;NCI Version&lt;/STRONG&gt; and I think it means version 1.1&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;0x01&lt;/STRONG&gt; is the c&lt;STRONG&gt;onfiguration status&lt;/STRONG&gt; and the value 0x01 means NCI RF Configuration has been reset&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Now if all that is fine, I don't understand why the device generates a NACK. It is similar to reading more bytes than it should.&lt;/P&gt;&lt;P&gt;Any comment or suggestion is welcome.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Aug 2022 16:36:29 GMT</pubDate>
    <dc:creator>dominusdrr</dc:creator>
    <dc:date>2022-08-31T16:36:29Z</dc:date>
    <item>
      <title>Why do I get a NACK when reading the response from the PN7150 device?</title>
      <link>https://community.nxp.com/t5/NFC/Why-do-I-get-a-NACK-when-reading-the-response-from-the-PN7150/m-p/1514783#M9631</link>
      <description>&lt;P&gt;Hi.&lt;BR /&gt;&lt;BR /&gt;I'm initializing the PN7150 device with a CORE_RESET_CMD command as shown in the following image:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dominusdrr_0-1661962793209.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/192004i4218869E1728B231/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dominusdrr_0-1661962793209.png" alt="dominusdrr_0-1661962793209.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I wait for the IRQ bit to go to logical 1 to try to read the response and I get the following:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dominusdrr_1-1661962929487.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/192005iDB7871D395F3DF05/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dominusdrr_1-1661962929487.png" alt="dominusdrr_1-1661962929487.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It can be seen that a NACK appears in the last byte, so I cannot continue to the next step, which is to obtain the notification.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you analyze the response frame, it appears to be correct:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;0x51&lt;/STRONG&gt;&amp;nbsp;is the control byte where the I2C device address is and the R/W bit is at logical 1 (read)&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;0x40&lt;/STRONG&gt; is the first byte of the NCI specification and corresponds to the &lt;STRONG&gt;MT value&lt;/STRONG&gt; which in this case means response to the previous command&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;0x00&lt;/STRONG&gt; is the &lt;STRONG&gt;OID&lt;/STRONG&gt; and it seems to me that it must be the same value of the sent command.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;0x03&lt;/STRONG&gt; is the length of the payload bytes&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0x00&lt;/STRONG&gt; corresponds to the &lt;STRONG&gt;Status&lt;/STRONG&gt; and means STATUS_OK&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0x11&lt;/STRONG&gt; is the &lt;STRONG&gt;NCI Version&lt;/STRONG&gt; and I think it means version 1.1&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;0x01&lt;/STRONG&gt; is the c&lt;STRONG&gt;onfiguration status&lt;/STRONG&gt; and the value 0x01 means NCI RF Configuration has been reset&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Now if all that is fine, I don't understand why the device generates a NACK. It is similar to reading more bytes than it should.&lt;/P&gt;&lt;P&gt;Any comment or suggestion is welcome.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 16:36:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Why-do-I-get-a-NACK-when-reading-the-response-from-the-PN7150/m-p/1514783#M9631</guid>
      <dc:creator>dominusdrr</dc:creator>
      <dc:date>2022-08-31T16:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get a NACK when reading the response from the PN7150 device?</title>
      <link>https://community.nxp.com/t5/NFC/Why-do-I-get-a-NACK-when-reading-the-response-from-the-PN7150/m-p/1514925#M9634</link>
      <description>&lt;P&gt;I answer to myself.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm reviewing the concepts of I2C (learned many years ago) and whoever issues an ACK or a NACK is the one who receives each byte.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case, the Microcontroller is reading bytes from the slave, it would be the (MCU) that is issuing a NACK to the PN7150&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In the attached image of the logic analyzer, you can see that the IRQ pin goes to logic zero after the last byte, that means that the PN7150 has no more bytes to send to the master. (I think so)&lt;BR /&gt;&lt;BR /&gt;The NACK is to inform the slave not to send any more bytes, the read is finished&lt;/P&gt;&lt;P&gt;I tried to read fewer bytes and the IRQ stays high, I guess it's to report that more bytes still need to be read.&lt;/P&gt;&lt;P&gt;The next step is to read the notification, but it seems to me that this only happens when there was a problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 20:23:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Why-do-I-get-a-NACK-when-reading-the-response-from-the-PN7150/m-p/1514925#M9634</guid>
      <dc:creator>dominusdrr</dc:creator>
      <dc:date>2022-08-31T20:23:06Z</dc:date>
    </item>
  </channel>
</rss>

