<?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のトピックRe: Interrupt handling of Library software</title>
    <link>https://community.nxp.com/t5/NFC/Interrupt-handling-of-Library-software/m-p/650471#M1701</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first, apologize my delayed response to that question, I didn't see it sooner.&lt;/P&gt;&lt;P&gt;ad 1) You are right: There are two data exchange APIs:&amp;nbsp;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;phhalHw_Exchange is the fully synchronous send/receive API. So it sends our a frame and waits for card response. So once this API returns you either have already received something from the card (and it's in the receive buffer), or, in case of an error (for instance card is not in proximity any longer) this function returns with an appropriate error message. Second API set (&lt;SPAN&gt;phhalHw_Transmit and&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;phhalHw_Receive is doing the same but splits in send and receive operation. The former API returns once data has been transmitted to a card, the latter returns once card response has been received (or receive timeout).&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;So why do we need two different API sets? The actual difference is that&amp;nbsp;phhalHw_Exchange is mainly used in reader mode, i.e. PN5180 is the reader and communicates with a card.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;PN5180 and the reader library can also be operated in card emulation (or p2p target mode), i.e. PN5180 and reader lib behave like a card and the counterpart is a reader. In this case first&amp;nbsp;phhalHw_Receive needs to be called. The received data from the reader will be forwarded to the application. The application then prepares a response and this response is sent out using phhalHw_Transmit.&amp;nbsp;Using phhalHw_Exchange would not be possible in that case (even if phhalHw_Exchange would first receive and then transmit) since it's blocking and doesn't return back to application between receive and transmit.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I guess your 2nd question has been answered in a different thread, if not, please let me know!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Christian.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Nov 2016 20:12:13 GMT</pubDate>
    <dc:creator>christianeisend</dc:creator>
    <dc:date>2016-11-15T20:12:13Z</dc:date>
    <item>
      <title>Interrupt handling of Library software</title>
      <link>https://community.nxp.com/t5/NFC/Interrupt-handling-of-Library-software/m-p/650470#M1700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;Christian san,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;Very sorry to ask too basic question to you but please let me know.how to receive the data form PN5180?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;Library software is too sophisticated for me to fully understand by myself. I think the command/data is sent by using&amp;nbsp;some kinds of&amp;nbsp;Read(Write)Registe function such as instr_Read(Write)Register, Rad(Write)RegisterAndMask, etc which call LpcOpenSpi_Exchange function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;My question is;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;(1) It looks there are two methods to get data:One is using &amp;nbsp;phhalHw_Pn5180_Transmit/phhalHw_Pn5180_Receive and another is using phhalHw_Exchange. What is the difference between them and what function do they have?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;(2) When receiving the data from PN5180, I think, IRQ is used. But I cannot find where the INT is detected and handler is executed in Library software coding. Could you tell me the mechanism to get the data from INT detection to putting them to buffer?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;Very sorry to ask complicated questions every time and thank you for your supports!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: #666666;"&gt;&amp;nbsp; &amp;nbsp;S. Miwa&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2016 05:43:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Interrupt-handling-of-Library-software/m-p/650470#M1700</guid>
      <dc:creator>smiwa</dc:creator>
      <dc:date>2016-11-11T05:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt handling of Library software</title>
      <link>https://community.nxp.com/t5/NFC/Interrupt-handling-of-Library-software/m-p/650471#M1701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first, apologize my delayed response to that question, I didn't see it sooner.&lt;/P&gt;&lt;P&gt;ad 1) You are right: There are two data exchange APIs:&amp;nbsp;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;phhalHw_Exchange is the fully synchronous send/receive API. So it sends our a frame and waits for card response. So once this API returns you either have already received something from the card (and it's in the receive buffer), or, in case of an error (for instance card is not in proximity any longer) this function returns with an appropriate error message. Second API set (&lt;SPAN&gt;phhalHw_Transmit and&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;phhalHw_Receive is doing the same but splits in send and receive operation. The former API returns once data has been transmitted to a card, the latter returns once card response has been received (or receive timeout).&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;So why do we need two different API sets? The actual difference is that&amp;nbsp;phhalHw_Exchange is mainly used in reader mode, i.e. PN5180 is the reader and communicates with a card.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;PN5180 and the reader library can also be operated in card emulation (or p2p target mode), i.e. PN5180 and reader lib behave like a card and the counterpart is a reader. In this case first&amp;nbsp;phhalHw_Receive needs to be called. The received data from the reader will be forwarded to the application. The application then prepares a response and this response is sent out using phhalHw_Transmit.&amp;nbsp;Using phhalHw_Exchange would not be possible in that case (even if phhalHw_Exchange would first receive and then transmit) since it's blocking and doesn't return back to application between receive and transmit.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I guess your 2nd question has been answered in a different thread, if not, please let me know!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Christian.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 20:12:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Interrupt-handling-of-Library-software/m-p/650471#M1701</guid>
      <dc:creator>christianeisend</dc:creator>
      <dc:date>2016-11-15T20:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt handling of Library software</title>
      <link>https://community.nxp.com/t5/NFC/Interrupt-handling-of-Library-software/m-p/650472#M1702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;Christian san,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;Thank you for answering every time and you are very smart to explain.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;For this matter, I fully understood!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;Thanks again!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #666666; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp;S. Miwa&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 23:35:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Interrupt-handling-of-Library-software/m-p/650472#M1702</guid>
      <dc:creator>smiwa</dc:creator>
      <dc:date>2016-11-15T23:35:53Z</dc:date>
    </item>
  </channel>
</rss>

