<?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 USB OUT data lost when waking from USB interrupt (i.MX25) in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/USB-OUT-data-lost-when-waking-from-USB-interrupt-i-MX25/m-p/716906#M111396</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We are running into an issue when our target USB device wakes from DOZE mode due to an OUT transfer from the USB host.&amp;nbsp; The data in first OUT from the host wakes the target.&amp;nbsp; The bus sniffer shows the first packet is ACK'ed (yes ACK'ed.&amp;nbsp; Not NACK'ed, stalled, etc).&amp;nbsp; Yet, the software doesn't see the transfer complete bit until the second OUT is ACK'ed.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Target: i.MX25 (no operating system).&amp;nbsp;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Goal: Target device is in doze mode.&amp;nbsp; The USB host sends an OUT to wake our target device.&amp;nbsp; The target should wake up and process the data.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Issue: The target device wakes, but the data in the first OUT is missing.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want to poison the well.&amp;nbsp; But, it seems the software may not see the transfer complete interrupt for the first OUT because the CPU clock is off when it arrives.&amp;nbsp; Is this plausible?&amp;nbsp; Is there a way around this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In preparation for doze mode:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the USB clocks are left running&lt;/LI&gt;&lt;LI&gt;timer interrupts are temporarily disabled&lt;/LI&gt;&lt;LI&gt;wake interrupts are set so that the target wakes when the user connects the USB cable to a host&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Observations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When using a packet sniffer (ellisys USB explorer):&lt;UL&gt;&lt;LI&gt;The first packet is ACK'ed immediately.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The second packet is NACK'ed for 30ms.&lt;/LI&gt;&lt;LI&gt;This is followed by a successful SETUP sequence.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The second packet is NACK'ed for another 80ms, then finally ACK'ed.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;From the software perspective:&lt;UL&gt;&lt;LI&gt;At the first interrupt after the wake event:&lt;UL&gt;&lt;LI&gt;we see is the USB error in status register (bit 1); not the transaction completion bit (0) that we usually see after an ACK'ed data packet.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The dTD status bits indicate no error.&amp;nbsp; Only the active bit is set.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;The next interrupt it sees is the transaction complete interrupt.&amp;nbsp; But we get the data from the second OUT.&amp;nbsp; &lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advanced!&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Feb 2018 19:35:05 GMT</pubDate>
    <dc:creator>stephenbialkows</dc:creator>
    <dc:date>2018-02-05T19:35:05Z</dc:date>
    <item>
      <title>USB OUT data lost when waking from USB interrupt (i.MX25)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/USB-OUT-data-lost-when-waking-from-USB-interrupt-i-MX25/m-p/716906#M111396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We are running into an issue when our target USB device wakes from DOZE mode due to an OUT transfer from the USB host.&amp;nbsp; The data in first OUT from the host wakes the target.&amp;nbsp; The bus sniffer shows the first packet is ACK'ed (yes ACK'ed.&amp;nbsp; Not NACK'ed, stalled, etc).&amp;nbsp; Yet, the software doesn't see the transfer complete bit until the second OUT is ACK'ed.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Target: i.MX25 (no operating system).&amp;nbsp;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Goal: Target device is in doze mode.&amp;nbsp; The USB host sends an OUT to wake our target device.&amp;nbsp; The target should wake up and process the data.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Issue: The target device wakes, but the data in the first OUT is missing.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want to poison the well.&amp;nbsp; But, it seems the software may not see the transfer complete interrupt for the first OUT because the CPU clock is off when it arrives.&amp;nbsp; Is this plausible?&amp;nbsp; Is there a way around this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In preparation for doze mode:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the USB clocks are left running&lt;/LI&gt;&lt;LI&gt;timer interrupts are temporarily disabled&lt;/LI&gt;&lt;LI&gt;wake interrupts are set so that the target wakes when the user connects the USB cable to a host&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Observations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When using a packet sniffer (ellisys USB explorer):&lt;UL&gt;&lt;LI&gt;The first packet is ACK'ed immediately.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The second packet is NACK'ed for 30ms.&lt;/LI&gt;&lt;LI&gt;This is followed by a successful SETUP sequence.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The second packet is NACK'ed for another 80ms, then finally ACK'ed.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;From the software perspective:&lt;UL&gt;&lt;LI&gt;At the first interrupt after the wake event:&lt;UL&gt;&lt;LI&gt;we see is the USB error in status register (bit 1); not the transaction completion bit (0) that we usually see after an ACK'ed data packet.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The dTD status bits indicate no error.&amp;nbsp; Only the active bit is set.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;The next interrupt it sees is the transaction complete interrupt.&amp;nbsp; But we get the data from the second OUT.&amp;nbsp; &lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advanced!&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 19:35:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/USB-OUT-data-lost-when-waking-from-USB-interrupt-i-MX25/m-p/716906#M111396</guid>
      <dc:creator>stephenbialkows</dc:creator>
      <dc:date>2018-02-05T19:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: USB OUT data lost when waking from USB interrupt (i.MX25)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/USB-OUT-data-lost-when-waking-from-USB-interrupt-i-MX25/m-p/716907#M111397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephen,&lt;/P&gt;&lt;P&gt;You could take a look at the following Community thread, and application note, in order to verify if this may apply in your case:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/464548"&gt;https://community.nxp.com/thread/464548&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN3683.pdf"&gt;https://www.nxp.com/docs/en/application-note/AN3683.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this will be useful for you.&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;P&gt;/Carlos&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2018 22:58:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/USB-OUT-data-lost-when-waking-from-USB-interrupt-i-MX25/m-p/716907#M111397</guid>
      <dc:creator>CarlosCasillas</dc:creator>
      <dc:date>2018-02-16T22:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: USB OUT data lost when waking from USB interrupt (i.MX25)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/USB-OUT-data-lost-when-waking-from-USB-interrupt-i-MX25/m-p/716908#M111398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Carlos,&lt;/P&gt;&lt;P&gt;Thanks for getting back to me.&amp;nbsp; That was my community post.&amp;nbsp; The problem was the OTG port hadn't been setup correctly.&amp;nbsp; The first OUT packet size is 5 bytes.&amp;nbsp; So I don't think that app note applies.&amp;nbsp; Other thoughts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Feb 2018 00:23:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/USB-OUT-data-lost-when-waking-from-USB-interrupt-i-MX25/m-p/716908#M111398</guid>
      <dc:creator>stephenbialkows</dc:creator>
      <dc:date>2018-02-17T00:23:32Z</dc:date>
    </item>
  </channel>
</rss>

