<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックRe: USB not working after cpu reset.</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-not-working-after-cpu-reset/m-p/259336#M11680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestions.&amp;nbsp; In the end it turned out I was resetting the in pipe in my driver when I shouldn't have.&amp;nbsp; For some reason, it was only a problem after a reset between application and bootloader.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2013 20:22:08 GMT</pubDate>
    <dc:creator>VinceTF</dc:creator>
    <dc:date>2013-04-11T20:22:08Z</dc:date>
    <item>
      <title>USB not working after cpu reset.</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-not-working-after-cpu-reset/m-p/259334#M11678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Device: mcf52258&lt;/P&gt;&lt;P&gt;RTOS: MQX 3.8.1&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Operation for bootloader (bare metal) is as follows:&lt;/P&gt;&lt;P&gt;1) USB is working and responding fine.&lt;/P&gt;&lt;P&gt;2) reset cpu as shown in snippit A below.&amp;nbsp; STACK_POINTER = 0x0000, START_ADDRESS = 0x0004&lt;/P&gt;&lt;P&gt;3) bootloader restarts and usb works fine.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Operation for main application (using MQX RTOS) is as follows:&lt;/P&gt;&lt;P&gt;1) USB is working and responding fine.&lt;/P&gt;&lt;P&gt;2) Disable interrupts with _int_disable() and then execute code snippit A. STACK_POINTER = 0x9000, START_ADDRESS = 0x9004&lt;/P&gt;&lt;P&gt;3) Main application restarts.&amp;nbsp; Heartbeat LED and serial comm indicate it is running.&amp;nbsp; However, usb driver is non-responsive.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I step through the code, I can see code where I execute the Data 0/1 toggle for my IN endpoint.&amp;nbsp; Using my usb bus tools, I can see that the usb bus is non-responsive.&amp;nbsp; Any idea what is going on here? &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code Snippet A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; //Disable USB interrupts&lt;/P&gt;&lt;P&gt;&amp;nbsp; MCF_USB_OTG_ERR_ENB = 0x00;&amp;nbsp; //disable usb error interrupts&lt;/P&gt;&lt;P&gt;&amp;nbsp; MCF_USB_OTG_INT_ENB = 0x00; //disable usb token interrupts&lt;/P&gt;&lt;P&gt;&amp;nbsp; MCF_INTC0_IMRH |= MCF_INTC_INTFRCH_INTFRC53; //Mask USB interrupt&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; asm(move.w #0x2700,sr); //disable interrupts&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; size_1 = *((unsigned long int *)(STACK_POINTER));&amp;nbsp;&amp;nbsp; // get the stack pointer from flash&lt;/P&gt;&lt;P&gt;&amp;nbsp; size_2 = *((unsigned long int *)(START_ADDRESS));&amp;nbsp;&amp;nbsp; // get the jump to startup address from flash&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // start moduleware execution - this sequence is identical to the ROM boot sequence for the processor&lt;/P&gt;&lt;P&gt;&amp;nbsp; asm&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; move.l size_1, A7;&amp;nbsp;&amp;nbsp; // load stack pointer&lt;/P&gt;&lt;P&gt;&amp;nbsp; move.l size_2, A0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; jmp (A0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // jump to moduleware&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; } &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 21:30:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-not-working-after-cpu-reset/m-p/259334#M11678</guid>
      <dc:creator>VinceTF</dc:creator>
      <dc:date>2013-04-09T21:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: USB not working after cpu reset.</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-not-working-after-cpu-reset/m-p/259335#M11679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; 2) reset cpu as shown in snippit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is that code "resetting the CPU"? It is just starting the software again. I would not expect the hardware to be reset by that. It is possible to write drivers to try to completely reset the hardware, but programmers normally don't bother as they expect the hardware reset has just done that for them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may want to read through the USB chapter and reset as many registers as you can find back to their hardware reset states. In particular, set "20.4.1.14 Control Register (CTL)" back to the default to disable the controller. Likewise USB_CTRL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 00:57:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-not-working-after-cpu-reset/m-p/259335#M11679</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2013-04-10T00:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: USB not working after cpu reset.</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-not-working-after-cpu-reset/m-p/259336#M11680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestions.&amp;nbsp; In the end it turned out I was resetting the in pipe in my driver when I shouldn't have.&amp;nbsp; For some reason, it was only a problem after a reset between application and bootloader.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 20:22:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/USB-not-working-after-cpu-reset/m-p/259336#M11680</guid>
      <dc:creator>VinceTF</dc:creator>
      <dc:date>2013-04-11T20:22:08Z</dc:date>
    </item>
  </channel>
</rss>

