<?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: Problem with 4357 USB1 with external phy in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-4357-USB1-with-external-phy/m-p/574983#M19142</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mc on Thu Apr 30 17:20:00 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi toad,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you please check whether you are getting reset interrupt in your code? Please place break point&amp;nbsp; at&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USBD_API-&amp;gt;hw-&amp;gt;ISR(hUsb) when USBSTS_URI bit is set?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt; void USB1_IRQHandler(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; uint32_t disr = LPC_USB1-&amp;gt;USBSTS_D;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; if (disr &amp;amp; USBSTS_URI) {&lt;BR /&gt;USBD_API-&amp;gt;hw-&amp;gt;ISR(hUsb);&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp; USBD_API-&amp;gt;hw-&amp;gt;ISR(hUsb);&lt;BR /&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:58:37 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:58:37Z</dc:date>
    <item>
      <title>Problem with 4357 USB1 with external phy</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-4357-USB1-with-external-phy/m-p/574982#M19141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by toad on Thu Apr 23 15:26:34 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a LPC 4357 connected to a cypress CY7C68003 device only ULPI interface (TX2) on USB1. I configure it using logic similar to that described in app note AN1309 (see below)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It appears that the&amp;nbsp; CY7C68003 also requires some custom configuration. From the cy7c68003 app note&amp;nbsp; AN42266:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After reset use the ULPI RegWrite command to initialize the TX2 device in full speed mode and enable the USB interface:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1&amp;nbsp; Write 0x45 to Function Control Register (0x4)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Write 0x0 to Interface control register (0x7)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Write 0x4 to USB Interface Control Register (0x35)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe I can do this using the LPC viewport:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ret = USBD_API-&amp;gt;hw-&amp;gt;Init(&amp;amp;g_hUsb, &amp;amp;desc, &amp;amp;usb_param);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiRegWrite (0x4,0x45);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiRegWrite (0x7,0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiRegWrite (0x35,0x4);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;which results in&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USBD_API-&amp;gt;hw-&amp;gt;Init USB1 returncode=0 g_hUsb=100894a8&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;register dump&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x00]=0xB4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x01]=0x04&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x02]=0x03&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x03]=0x68&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x04]=0x45&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x07]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x0A]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x0D]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x10]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x13]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x14]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x15]=0x01&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x16]=0x55&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x19]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x1D]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x20]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x21]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x31]=0xA0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x32]=0x80&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x33]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x35]=0x04&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x36]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UlpiReg[0x39]=0x00&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Following on, the cypress app note states that when the TX2 connects to the host and the host initiates a reset sequence and the TX2 sends the updated line state in a RX CMD to the controller. "To enable chirp signaling, the controller must write 0x54 to the Function Control Register and then initiate a NOPID transmit sequence". My question is, does the ROM code do any of this? and if not is there a way a can detect the line status update and send a NOPID transmit sequence ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;static void ULPI_USB1_init( void )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t&amp;nbsp; portsc;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* disable USB1_CLOCK, it's clock will be provided by the PHY */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_CCU1-&amp;gt;CLKCCU[CLK_USB1].CFG &amp;amp;= ~1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; SetUsb1ClockPinmux ();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* switch to ulpi phy and turn on the power to phy*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Clear PFSC (bit24) to prevent the port from forcing a high speed connection&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; portsc = LPC_USB1-&amp;gt;PORTSC1_D &amp;amp; 0x00FFFFFF;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; portsc |= _BIT(24); // force full speed connection OR&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //portsc &amp;amp;= ~_BIT(24); // clear PFSC to allow any speed connect&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; portsc |= 0x80000000; // PTS select, bit 31:30, 0x2 = ULPI&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_USB1-&amp;gt;PORTSC1_D = portsc;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* reset the controller */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_USB1-&amp;gt;USBCMD_D = _BIT(1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* wait for reset to complete */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while ((LPC_USB1-&amp;gt;USBCMD_D &amp;amp; _BIT(1)));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Program the controller to be the USB device mode */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_USB1-&amp;gt;USBMODE_D =&amp;nbsp;&amp;nbsp; 0x02 | _BIT(3);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:58:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-4357-USB1-with-external-phy/m-p/574982#M19141</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with 4357 USB1 with external phy</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-4357-USB1-with-external-phy/m-p/574983#M19142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mc on Thu Apr 30 17:20:00 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi toad,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you please check whether you are getting reset interrupt in your code? Please place break point&amp;nbsp; at&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;USBD_API-&amp;gt;hw-&amp;gt;ISR(hUsb) when USBSTS_URI bit is set?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt; void USB1_IRQHandler(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; uint32_t disr = LPC_USB1-&amp;gt;USBSTS_D;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; if (disr &amp;amp; USBSTS_URI) {&lt;BR /&gt;USBD_API-&amp;gt;hw-&amp;gt;ISR(hUsb);&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp; USBD_API-&amp;gt;hw-&amp;gt;ISR(hUsb);&lt;BR /&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:58:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-4357-USB1-with-external-phy/m-p/574983#M19142</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with 4357 USB1 with external phy</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-4357-USB1-with-external-phy/m-p/574984#M19143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by toad on Fri May 01 07:31:47 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems that the Cypress PHY expects the device processor to monitor VBUS externally (not via the PHY) and use the external monitor to trigger the connection process.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.cypress.com%2F%3Fid%3D4%26rID%3D42753" rel="nofollow" target="_blank"&gt;http://www.cypress.com/?id=4&amp;amp;rID=42753&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure that there is any way I could incorporate this model along side the ROM firmware so I have switched over to the SMSC 3343 which appears to be working&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:58:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-4357-USB1-with-external-phy/m-p/574984#M19143</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with 4357 USB1 with external phy</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-4357-USB1-with-external-phy/m-p/574985#M19144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mc on Fri May 01 08:47:33 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi toad,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Good to know that SMSC3343 is working. Cypress PHY may not be setting pull up correctly. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:58:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-4357-USB1-with-external-phy/m-p/574985#M19144</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with 4357 USB1 with external phy</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-4357-USB1-with-external-phy/m-p/574986#M19145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Toad,&lt;/P&gt;&lt;P&gt;Did you have to jump through any hoops to get the 3343 to work, or did it work as advertised? NXP has not been very helpful on this topic. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 05:30:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-4357-USB1-with-external-phy/m-p/574986#M19145</guid>
      <dc:creator>stevebress</dc:creator>
      <dc:date>2017-10-03T05:30:49Z</dc:date>
    </item>
  </channel>
</rss>

