<?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 Re: i.MX25 usb wake connect/disconnect in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX25-usb-wake-connect-disconnect/m-p/728919#M113342</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;&lt;/P&gt;&lt;P&gt;please look at Linux documentation&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/webapp/Download?colCode=IMX51_ER1011_LINUXDOCS_BUNDLE" title="https://www.nxp.com/webapp/Download?colCode=IMX51_ER1011_LINUXDOCS_BUNDLE"&gt;https://www.nxp.com/webapp/Download?colCode=IMX51_ER1011_LINUXDOCS_BUNDLE&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Linux 2.6.35 Source Code Files and documentation&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/webapp/sps/download/license.jsp?colCode=L2.6.35_11.03_ER_SOURCE&amp;amp;fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1&amp;amp;Parent_nodeId=&amp;amp;Parent_pageType=" title="https://www.nxp.com/webapp/sps/download/license.jsp?colCode=L2.6.35_11.03_ER_SOURCE&amp;amp;fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1&amp;amp;Parent_nodeId=&amp;amp;Parent_pageType="&gt;Linux 2.6.35 Source Code Files and documentation 11.03 for i.MX53 SABRE Tablet&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Nov 2017 05:42:36 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2017-11-29T05:42:36Z</dc:date>
    <item>
      <title>i.MX25 usb wake connect/disconnect</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX25-usb-wake-connect-disconnect/m-p/728916#M113339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am targeting an i.MX25 on a custom board.&amp;nbsp; We wish to have the system wake from stop upon USB wake.&amp;nbsp; The problem is this [dis]connect wake event doesn't happen, despite my best efforts to connect the dots in the reference manual.&amp;nbsp; Unfortunately, all similar questions are in the context of a Linux environment, which ignores the low level details that I need to understand.&amp;nbsp; Any insight that could decrease the velocity of my head spinning will be much appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am operating off the assumption that&amp;nbsp;it's sufficient to&amp;nbsp;reset the USB core,&amp;nbsp;put it in device mode, enable the wake events, wait for the OTG port to suspend, then activate the low-power USB interrupts in the CCM and ASIC registers.&amp;nbsp; I believe that putting the port in suspend enables the power control module, which monitors the bus for activity, and generates the wake interrupt according to the wake enables in the USB CTRL register.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;There are preconditions in changing the registers of interest.&amp;nbsp; I believe the registers are being set correctly.&amp;nbsp; Here's a summary how the registers are written:&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;read:&amp;nbsp;&amp;nbsp;0x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 from MX25_USBCMD stop @ 0x 19fa140&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; wrote: 0x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 to MX25_USBCMD reset (2 is cleared when complete, ignore upper word) @ 0x 19FA140&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt;&amp;nbsp;read:&amp;nbsp; 0x&amp;nbsp;&amp;nbsp; 80000 from MX25_USBCMD @ 0x 19fa140&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Some writes are omitted here.&amp;nbsp; Here is the register summary after device detect routine:&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;USBMODE:00000002 USBSTS:01000080 OTGSC:00000D20 USBCMD:00080001 PORTSCX:10000805 USB_CTRL:000D0870: B device detected&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;In summary, the device is running/attached and suspended.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Interrupts are enabled next:&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;wrote: 0x&amp;nbsp;&amp;nbsp; 50870 to USB CTRL clear wake interrupts @ 0x 19FA600&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; wrote: 0x&amp;nbsp;&amp;nbsp; 50870 to USB CTRL clear wake flags @ 0x 19FA600&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; wrote: 0x181dc870 to USB CTRL enable wake interrupts @ 0x 19FA600&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; wrote: 0x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 to MX25_USBINTR disable normal interrupts @ 0x 19FA148&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; wrote: 0xffffffff to MX25_USBSTS clear interrupt flags @ 0x 19FA144&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; wrote: 0x10300885 to MX25_USB_UOG_PORTSC enable port wake&amp;nbsp;interrupts @ 0x 19FA184&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; FAILED: wrote 0x10300885 to MX25_USB_UOG_PORTSC (wake on [dis]connect is read-only in device mode), read back: 0x10000885&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; wrote: 0x10300885 to MX25_USB_UOG_PORTSC suspend @ 0x 19FA184&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; FAILED: wrote 0x10300885 to MX25_USB_UOG_PORTSC suspend, read back: 0x10000885&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; UOG port suspend confirmed...&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0x10000885 from MX25_USB_UOG_PORTSC @ 0x 19fa184&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 from MX25_USB_UHG_PORTSC (host port shouldn't matter here)&amp;nbsp;@ 0x 19fa384&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Here's what the ASIC registers look like right before issuing the wfi instruction.&amp;nbsp; As you can see, both USB interrupts are enabled, there are no pending interrupts, all IRQs have the same (highest) priority, IRQs are enabled, FIQs are disabled.&amp;nbsp; Note that hardware acceleration for the USB interrupts is enabled via the ASIC INTENNUM register.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;read: 0x&amp;nbsp; 200000 from ASIC INTCNTL @ 0x 1973000&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 from ASIC NIMASK (disable val and lower irqs) @ 0x 1973004&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0x 218202c from ASIC INTENABLEH (1-enabled) @ 0x 1973010&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0x12810438 from ASIC INTENABLEL @ 0x 1973014&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0xffffffff from ASIC NIPRIO7 (priorities) @ 0x 1973020&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0xffffffff from ASIC NIPRIO6 @ 0x 1973024&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0xffffffff from ASIC NIPRIO5 @ 0x 1973028&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0xffffffff from ASIC NIPRIO4 @ 0x 197302c&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0xffffffff from ASIC NIPRIO3 @ 0x 1973030&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0xffffffff from ASIC NIPRIO2 @ 0x 1973034&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0xffffffff from ASIC NIPRIO1 @ 0x 1973038&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0xffffffff from ASIC NIPRIO0 @ 0x 197303c&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 from ASIC NIPENDH (pending?) @ 0x 1973058&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 from ASIC NIPENDL @ 0x 197305c&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 from ASIC FIPENDK @ 0x 1973060&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt; read: 0x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 from ASIC FIPENDL @ 0x 1973064&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I believe the 32KHz clock is running (assuming its the same clock that the DryIce module uses) because the RTC timer will wake the target.&amp;nbsp; I have only seen one disable flag in the DryIce control register (OSCB).&amp;nbsp; I'm sure it's not set.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;A few concerns:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;1) The wake on [dis]connect flags in the&amp;nbsp;UOG PORTSC1 register are read only.&amp;nbsp; I have to assume this functionality is always on considering the RM says device mode supports wake on [dis]connect.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;2) I noted a question in the iMX6 community where a user reported the over-current condition was getting in the way of a remote wake event.&amp;nbsp; We are not trying to wake the host.&amp;nbsp; But I am curious if that could get in the way of [dis]connect or traffic wake events.&amp;nbsp; The over-current flag appears to be stuck set on this target during normal USB operation.&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;3) The wake interrupt is asynchronous.&amp;nbsp; I'm a little concerned about the BYPASS_EN bit being read-only and cleared in the ASIC INTCNTL register.&amp;nbsp; The description reads: when reset (reset value=0), disables propagation of asynchronous interrupts.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;Stephen&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 18:44:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX25-usb-wake-connect-disconnect/m-p/728916#M113339</guid>
      <dc:creator>stephenbialkows</dc:creator>
      <dc:date>2017-11-22T18:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX25 usb wake connect/disconnect</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX25-usb-wake-connect-disconnect/m-p/728917#M113340</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;&lt;/P&gt;&lt;P&gt;I am not aware of i.MX25 usb wake up implementation in nxp bsps, seems&lt;/P&gt;&lt;P&gt;one can look at i.MX51 (has similar usb module) and attached Linux Manual&lt;/P&gt;&lt;P&gt;sect.29.11 USB Wakeup usage, check sources in&lt;/P&gt;&lt;P&gt;Board Support Packages (8)&lt;BR /&gt;Linux 2.6.35 Source Code Files&lt;BR /&gt;&lt;A href="https://www.nxp.com/products/power-management/pmics/power-management-for-i.mx-application-processors/i.mx53-quick-start-board:IMX53QSB?tab=Design_Tools_Tab"&gt;https://www.nxp.com/products/power-management/pmics/power-management-for-i.mx-application-processors/i.mx53-quick-start-board:IMX53QSB?tab=Design_Tools_Tab&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please pay attention to plls errata ENGcm12381,ERR007917&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/errata/IMX25CE.pdf" title="https://www.nxp.com/docs/en/errata/IMX25CE.pdf"&gt;https://www.nxp.com/docs/en/errata/IMX25CE.pdf&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&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, 24 Nov 2017 07:48:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX25-usb-wake-connect-disconnect/m-p/728917#M113340</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-11-24T07:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX25 usb wake connect/disconnect</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX25-usb-wake-connect-disconnect/m-p/728918#M113341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not familiar enough with Linux to know where to look.&amp;nbsp; Google is unable to find the pertinent suggested reading documents in the attached mx51_linux.pdf:&lt;/P&gt;&lt;P&gt;i.MX51PDK Linux Quick Start Guide&lt;/P&gt;&lt;P&gt;BSP API Document&lt;/P&gt;&lt;P&gt;i.MX51PDK Linux User’s Guide&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I have to request these documents from Freescale?&amp;nbsp; Do you have copies you can attach?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 01:49:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX25-usb-wake-connect-disconnect/m-p/728918#M113341</guid>
      <dc:creator>stephenbialkows</dc:creator>
      <dc:date>2017-11-29T01:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX25 usb wake connect/disconnect</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX25-usb-wake-connect-disconnect/m-p/728919#M113342</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;&lt;/P&gt;&lt;P&gt;please look at Linux documentation&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/webapp/Download?colCode=IMX51_ER1011_LINUXDOCS_BUNDLE" title="https://www.nxp.com/webapp/Download?colCode=IMX51_ER1011_LINUXDOCS_BUNDLE"&gt;https://www.nxp.com/webapp/Download?colCode=IMX51_ER1011_LINUXDOCS_BUNDLE&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Linux 2.6.35 Source Code Files and documentation&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/webapp/sps/download/license.jsp?colCode=L2.6.35_11.03_ER_SOURCE&amp;amp;fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1&amp;amp;Parent_nodeId=&amp;amp;Parent_pageType=" title="https://www.nxp.com/webapp/sps/download/license.jsp?colCode=L2.6.35_11.03_ER_SOURCE&amp;amp;fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1&amp;amp;Parent_nodeId=&amp;amp;Parent_pageType="&gt;Linux 2.6.35 Source Code Files and documentation 11.03 for i.MX53 SABRE Tablet&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 05:42:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX25-usb-wake-connect-disconnect/m-p/728919#M113342</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-11-29T05:42:36Z</dc:date>
    </item>
  </channel>
</rss>

