<?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: How to reset the USB peripheral on Coldfire MCF52254 in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-reset-the-USB-peripheral-on-Coldfire-MCF52254/m-p/357790#M12284</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tom, I think you are right about the registers - we'll try resetting more of them.&amp;nbsp; We'll also review that other thread you linked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using the MCF52254 in peripheral (device) mode, and the tablet is in OTG mode.&amp;nbsp; When it is in this state, the host doesn't see it any more.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Feb 2015 14:36:38 GMT</pubDate>
    <dc:creator>ARQuattr</dc:creator>
    <dc:date>2015-02-09T14:36:38Z</dc:date>
    <item>
      <title>How to reset the USB peripheral on Coldfire MCF52254</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-reset-the-USB-peripheral-on-Coldfire-MCF52254/m-p/357788#M12282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a MCF52254-based board connected to a tablet OTG port, and generally it works fine, but we have been able to reproduce cases where the USB gets in a state that we can't recover from without perform a power cycle.&amp;nbsp; When in this state, the tablet (OTG) host can no longer connect to the MCF52254.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We tried restarting the task as well as deinitializing the USB stack (we are using the MQX USB device stack and CDC class), but this isn't sufficient.&amp;nbsp; We can see that when it is in this state, even unplugging the USB cable doesn't let it recover.&amp;nbsp; The peripheral on the MCU seems to be in state that we can't get out of by just restarting the stack.&amp;nbsp; Deinit on the stack appears as though it's supposed to reset the hardware but it doesn't seem to do that.&amp;nbsp; &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We tried to reset the USB_EN bit (bit 0 of the CTL register, from 20.4.1.14 of the ref manual).&amp;nbsp; That did something as we weren't able to properly get the stack working again after doing it, but nevertheless, it still didn't cause the disconnection we are trying to achieve.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What registers or bits should I try to perform a hardware shut down of the USB peripheral?&amp;nbsp; Or is there some other MQX function that handles this for me?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Angelo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 03:58:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-reset-the-USB-peripheral-on-Coldfire-MCF52254/m-p/357788#M12282</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2015-02-09T03:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to reset the USB peripheral on Coldfire MCF52254</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-reset-the-USB-peripheral-on-Coldfire-MCF52254/m-p/357789#M12283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; We have a MCF52254-based board connected to a tablet OTG port&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The MCF52254 also supports OTG mode. So in your use, which end is acting as the Host and which end is the Peripheral?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the MCF52254 is acting as the Host, can you plug a keyboard, mouse or Memory Stick into it? Do these work when it is "locked up"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the MCF52254 is acting as the Peripheral, can you get any sense out of it from a Computer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; What registers or bits should I try to perform a hardware shut down of the USB peripheral?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't seem to have a "reset everything" control bit. I'd suggest writing all&amp;nbsp; the writeable registers (out of the 43 or so there) back to the "Default Values" listed in the Reference manual, making sure you disable all interrupts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The MQX Driver may be keeping some "internal state" that means it can't be initialized a second time. I don't know anything about MQX. I'd suggest reading the sources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd suggest you search these forums for "USB" or "OTG", especially in the MQX "place":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/435935#435935" title="https://community.freescale.com/message/435935#435935"&gt;https://community.freescale.com/message/435935#435935&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 05:44:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-reset-the-USB-peripheral-on-Coldfire-MCF52254/m-p/357789#M12283</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2015-02-09T05:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to reset the USB peripheral on Coldfire MCF52254</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-reset-the-USB-peripheral-on-Coldfire-MCF52254/m-p/357790#M12284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tom, I think you are right about the registers - we'll try resetting more of them.&amp;nbsp; We'll also review that other thread you linked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using the MCF52254 in peripheral (device) mode, and the tablet is in OTG mode.&amp;nbsp; When it is in this state, the host doesn't see it any more.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 14:36:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-reset-the-USB-peripheral-on-Coldfire-MCF52254/m-p/357790#M12284</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2015-02-09T14:36:38Z</dc:date>
    </item>
  </channel>
</rss>

