<?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 Host: Problem with detecting disconnects in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/USB-Host-Problem-with-detecting-disconnects/m-p/159050#M2880</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on a&amp;nbsp;USB Host mode&amp;nbsp;software driver for the USB1 hardware block in i.MX28. The hardware works fine except that when removing the USB Device from the port, the removal is not detected.&amp;nbsp;My interpretation is that this issue is a hardware error which should be documented in the reference manual or errata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, Device disconnects&amp;nbsp;&lt;EM&gt;are&lt;/EM&gt;&amp;nbsp;detected if one turns on the&amp;nbsp;ENHOSTDISCONDETECT bit in the&amp;nbsp;HW_USBPHY_CTRL register. The description of the bit in the reference manual says&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;For host mode, enables high-speed disconnect detector. This signal allows the override of&lt;BR /&gt; enabling the detection that is normally done in the UTMI controller.The UTMI controller enables&lt;BR /&gt; this circuit whenever the host sends a start-of-frame packet.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;As I interpret this, enabling of disconnect detection should really be automatic and setting the&amp;nbsp;ENHOSTDISCONDETECT shouldn't be needed, although the wording is ambigious.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fix triggers another problem though, as subsequent insertion of Device fails (reset of port fails).&amp;nbsp;As a fix for this issue,&amp;nbsp;turning off ENHOSTDISCONDETECT&amp;nbsp;after the removal of the Device enables subsequently inserted Devices to be successfully enumerated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These two fixes is what is done in the BSPHostDisconDetect()&amp;nbsp;function in the WinCE BSP code. The comment in the code says&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;// we should turn on this logic after BUS RESET and turn off&lt;BR /&gt; // this logic after device detach&lt;BR /&gt; //&lt;BR /&gt; // turn on this logic before device attach will cause attach failure&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;Could it be confirmed that this is indeed a hardware issue?&lt;/P&gt;&lt;P&gt;Is the trick with setting/clearing the&amp;nbsp;ENHOSTDISCONDETECT bit the proper way to solve the issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 May 2012 06:56:58 GMT</pubDate>
    <dc:creator>FredrikMoller</dc:creator>
    <dc:date>2012-05-07T06:56:58Z</dc:date>
    <item>
      <title>USB Host: Problem with detecting disconnects</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/USB-Host-Problem-with-detecting-disconnects/m-p/159050#M2880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on a&amp;nbsp;USB Host mode&amp;nbsp;software driver for the USB1 hardware block in i.MX28. The hardware works fine except that when removing the USB Device from the port, the removal is not detected.&amp;nbsp;My interpretation is that this issue is a hardware error which should be documented in the reference manual or errata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand, Device disconnects&amp;nbsp;&lt;EM&gt;are&lt;/EM&gt;&amp;nbsp;detected if one turns on the&amp;nbsp;ENHOSTDISCONDETECT bit in the&amp;nbsp;HW_USBPHY_CTRL register. The description of the bit in the reference manual says&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;For host mode, enables high-speed disconnect detector. This signal allows the override of&lt;BR /&gt; enabling the detection that is normally done in the UTMI controller.The UTMI controller enables&lt;BR /&gt; this circuit whenever the host sends a start-of-frame packet.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;As I interpret this, enabling of disconnect detection should really be automatic and setting the&amp;nbsp;ENHOSTDISCONDETECT shouldn't be needed, although the wording is ambigious.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fix triggers another problem though, as subsequent insertion of Device fails (reset of port fails).&amp;nbsp;As a fix for this issue,&amp;nbsp;turning off ENHOSTDISCONDETECT&amp;nbsp;after the removal of the Device enables subsequently inserted Devices to be successfully enumerated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These two fixes is what is done in the BSPHostDisconDetect()&amp;nbsp;function in the WinCE BSP code. The comment in the code says&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;// we should turn on this logic after BUS RESET and turn off&lt;BR /&gt; // this logic after device detach&lt;BR /&gt; //&lt;BR /&gt; // turn on this logic before device attach will cause attach failure&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;Could it be confirmed that this is indeed a hardware issue?&lt;/P&gt;&lt;P&gt;Is the trick with setting/clearing the&amp;nbsp;ENHOSTDISCONDETECT bit the proper way to solve the issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 06:56:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/USB-Host-Problem-with-detecting-disconnects/m-p/159050#M2880</guid>
      <dc:creator>FredrikMoller</dc:creator>
      <dc:date>2012-05-07T06:56:58Z</dc:date>
    </item>
  </channel>
</rss>

