<?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: Discovery loop keeps halting</title>
    <link>https://community.nxp.com/t5/NFC/Discovery-loop-keeps-halting/m-p/816987#M4206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can see this as it's not approved yet - so wait a few days. We had a problem like this and found some fairly significant issues in the Linux abstraction layer if you're using that.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/484506"&gt;https://community.nxp.com/thread/484506&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Sep 2018 04:22:11 GMT</pubDate>
    <dc:creator>christianhack</dc:creator>
    <dc:date>2018-09-14T04:22:11Z</dc:date>
    <item>
      <title>Discovery loop keeps halting</title>
      <link>https://community.nxp.com/t5/NFC/Discovery-loop-keeps-halting/m-p/816985#M4204</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;I am running a discovery loop using the NFC reader library on an IMX7 processor. For some strange reason the loop is halting. I don't know why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bool result = false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;phStatus_t status = PHAC_DISCLOOP_LPCD_NO_TECH_DETECTED;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Set Poll Configuration&lt;BR /&gt; result = (phacDiscLoop_SetConfig(m_pDiscLoop,&amp;nbsp;PHAC_DISCLOOP_CONFIG_PAS_POLL_TECH_CFG,&lt;BR /&gt;PHAC_DISCLOOP_POS_BIT_MASK_A | PHAC_DISCLOOP_POS_BIT_MASK_B)) == PH_ERR_SUCCESS);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint16_t stopped = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; // Set Discovery Poll State to Detection&lt;BR /&gt;&amp;nbsp; &amp;nbsp; result = result &amp;amp;&amp;amp; (phacDiscLoop_SetConfig(m_pDiscLoop,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PHAC_DISCLOOP_CONFIG_NEXT_POLL_STATE,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PHAC_DISCLOOP_POLL_STATE_DETECTION) == PH_ERR_SUCCESS);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; "discovery loop" &amp;lt;&amp;lt; std::endl;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; // Start discovery loop&lt;BR /&gt;&amp;nbsp; &amp;nbsp; status = phacDiscLoop_Run(m_pDiscLoop, PHAC_DISCLOOP_ENTRY_POINT_POLL);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;//Check if loop was stopped&lt;BR /&gt;&amp;nbsp; &amp;nbsp;result = result &amp;amp;&amp;amp; (phacDiscLoop_GetConfig(m_pDiscLoop,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PHAC_DISCLOOP_CONFIG_STOP_DETECTION_LOOP,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;stopped) == PH_ERR_SUCCESS);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; "discovery loop 2" &amp;lt;&amp;lt; std::endl;&lt;/P&gt;&lt;P&gt;} while (((status &amp;amp; PH_ERR_MASK) == PHAC_DISCLOOP_NO_TECH_DETECTED) &amp;amp;&amp;amp; result &amp;amp;&amp;amp; !stopped);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if (stopped)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; // Reset the stop detector&lt;BR /&gt;&amp;nbsp; &amp;nbsp; phacDiscLoop_SetConfig(m_pDiscLoop, PHAC_DISCLOOP_CONFIG_STOP_DETECTION_LOOP, 0);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I put some debug statements in to help me understand where things were going wrong. I found that the&amp;nbsp;&lt;SPAN&gt;phacDiscLoop_Run doesn't return after some time, and therefore I never exit the do...while loop.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What could be going wrong? I have implemented an IRQ polling in another thread.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could it be some synchronisation or resource problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 04:58:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Discovery-loop-keeps-halting/m-p/816985#M4204</guid>
      <dc:creator>jacobi</dc:creator>
      <dc:date>2018-08-23T04:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Discovery loop keeps halting</title>
      <link>https://community.nxp.com/t5/NFC/Discovery-loop-keeps-halting/m-p/816986#M4205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you may try to add a timer in the do while loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 09:09:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Discovery-loop-keeps-halting/m-p/816986#M4205</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2018-08-30T09:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Discovery loop keeps halting</title>
      <link>https://community.nxp.com/t5/NFC/Discovery-loop-keeps-halting/m-p/816987#M4206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can see this as it's not approved yet - so wait a few days. We had a problem like this and found some fairly significant issues in the Linux abstraction layer if you're using that.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/484506"&gt;https://community.nxp.com/thread/484506&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2018 04:22:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Discovery-loop-keeps-halting/m-p/816987#M4206</guid>
      <dc:creator>christianhack</dc:creator>
      <dc:date>2018-09-14T04:22:11Z</dc:date>
    </item>
  </channel>
</rss>

