<?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中的主题 Bal Driver Implementation and timing</title>
    <link>https://community.nxp.com/t5/NFC/Bal-Driver-Implementation-and-timing/m-p/748314#M3244</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are using PN5180 on Linux based custom board used for payment applications.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using example applications, we see that there are around 3 sec delay between some of the transactions.&lt;/P&gt;&lt;P&gt;We use Bal driver from&amp;nbsp;&lt;A href="https://github.com/NXPNFCLinux/nxprdlib-kernel-bal"&gt;https://github.com/NXPNFCLinux/nxprdlib-kernel-bal&lt;/A&gt;&amp;nbsp;and&amp;nbsp;SW3693-1 package from NXP as reader library.&lt;/P&gt;&lt;P&gt;One of the obvious problems I see with BAL driver is, it registers for only Falling edge of busy line.&lt;/P&gt;&lt;P&gt;status = request_threaded_irq(bal.busy_irq, bal_busy_isr,&lt;BR /&gt; NULL,&lt;BR /&gt; IRQF_TRIGGER_FALLING,&lt;BR /&gt; "bal", &amp;amp;bal);&lt;/P&gt;&lt;P&gt;For the first transaction, Bal_write will not wait for busy line and goes ahead and performs SPI write, but for next transaction, it will wait for 3 secs as the timeout for completion in bal_write is 3 secs. The only possible way to avoid this 3 seconds is, if data is fed continuously and PN5180 completes write/read transaction and brings down busy line in this 3 secs waiting time of next write/read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this how it was designed?&lt;/P&gt;&lt;P&gt;Shouldn't driver hold the status of busy line by registering for both&amp;nbsp;&lt;SPAN&gt;IRQF_TRIGGER_FALLING and&amp;nbsp;IRQF_TRIGGER_RISING and read the busy line (as most likely it will be connected to GPIO) and keep track of busy line status. Go to wait in read/write only if busy line is high.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Feb 2018 13:43:58 GMT</pubDate>
    <dc:creator>sandeepbettahal</dc:creator>
    <dc:date>2018-02-15T13:43:58Z</dc:date>
    <item>
      <title>Bal Driver Implementation and timing</title>
      <link>https://community.nxp.com/t5/NFC/Bal-Driver-Implementation-and-timing/m-p/748314#M3244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are using PN5180 on Linux based custom board used for payment applications.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using example applications, we see that there are around 3 sec delay between some of the transactions.&lt;/P&gt;&lt;P&gt;We use Bal driver from&amp;nbsp;&lt;A href="https://github.com/NXPNFCLinux/nxprdlib-kernel-bal"&gt;https://github.com/NXPNFCLinux/nxprdlib-kernel-bal&lt;/A&gt;&amp;nbsp;and&amp;nbsp;SW3693-1 package from NXP as reader library.&lt;/P&gt;&lt;P&gt;One of the obvious problems I see with BAL driver is, it registers for only Falling edge of busy line.&lt;/P&gt;&lt;P&gt;status = request_threaded_irq(bal.busy_irq, bal_busy_isr,&lt;BR /&gt; NULL,&lt;BR /&gt; IRQF_TRIGGER_FALLING,&lt;BR /&gt; "bal", &amp;amp;bal);&lt;/P&gt;&lt;P&gt;For the first transaction, Bal_write will not wait for busy line and goes ahead and performs SPI write, but for next transaction, it will wait for 3 secs as the timeout for completion in bal_write is 3 secs. The only possible way to avoid this 3 seconds is, if data is fed continuously and PN5180 completes write/read transaction and brings down busy line in this 3 secs waiting time of next write/read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this how it was designed?&lt;/P&gt;&lt;P&gt;Shouldn't driver hold the status of busy line by registering for both&amp;nbsp;&lt;SPAN&gt;IRQF_TRIGGER_FALLING and&amp;nbsp;IRQF_TRIGGER_RISING and read the busy line (as most likely it will be connected to GPIO) and keep track of busy line status. Go to wait in read/write only if busy line is high.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 13:43:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Bal-Driver-Implementation-and-timing/m-p/748314#M3244</guid>
      <dc:creator>sandeepbettahal</dc:creator>
      <dc:date>2018-02-15T13:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Bal Driver Implementation and timing</title>
      <link>https://community.nxp.com/t5/NFC/Bal-Driver-Implementation-and-timing/m-p/748315#M3245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the late response,&amp;nbsp;by any chance have you checked the complete folder available with the API documentation? I believe you will find a lot of useful information about the BAL implementation and available APIs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beside it,&amp;nbsp; I will ask about it and if I get any response if it was designed that way, I'll update you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Estephania&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2018 00:00:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Bal-Driver-Implementation-and-timing/m-p/748315#M3245</guid>
      <dc:creator>stephanie_m</dc:creator>
      <dc:date>2018-03-20T00:00:54Z</dc:date>
    </item>
  </channel>
</rss>

