<?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 k20_100: no TOKENDNE interrupt. Please help. in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-k20-100-no-TOKENDNE-interrupt-Please-help/m-p/270710#M9157</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I try to build my small home 3d printer, PCB is fully handmade and I use gentoo linux + manually built gnu toolchain + openocd for debugging. (JTAG debugger also is homemade based on FT2232D)&lt;/P&gt;&lt;P&gt;So everything is good and works, but I can't launch USB. I try to utilize &lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MEDICALUSB" title="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MEDICALUSB"&gt;USB Stack&lt;/A&gt; v 4.1.1. and started from "virtual com" and "printer" examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is usb is not enumerated by host. (output is below). While it seems all works. USB initialization finishes well, no hangs or something suspicious.&lt;/P&gt;&lt;P&gt;By debugging USB_ISR I found that first SETUP packet (request for device descriptor) doesn't happen. (I see Reset and then Sleep interrupts when plug a cable).&lt;/P&gt;&lt;P&gt;The error can be very simple and stupid... &lt;/P&gt;&lt;P&gt;Appreciate any ideas, ( some subtle bit in some register... anything what should be tuned for the controller). I noticed k20_100 is not on the list of supported controllers (while download the USB stack) but there are neighbor K40_100, K20_72.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional information and things I've checked:&lt;/P&gt;&lt;P&gt;Exact controller model: &lt;STRONG&gt;MK20DN512VLK10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;8 MHZ crystall oscillator, 96 MHz of PLL.&lt;/P&gt;&lt;P&gt;Divided by 2 frequency for USB.&lt;/P&gt;&lt;P&gt;External power supply. I connected USB 5V to VREGIN according to documentation.&lt;/P&gt;&lt;P&gt;Since I'm unable to run examples in "native" environment I just built them with CMake, guessing macro definitions and removing GPIO parts with LEDs.&lt;/P&gt;&lt;P&gt;I use only one interrupt 89 (IRQ 73). Are there any others needed ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output from &amp;gt;cat /proc/kmsg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346621.468490] hub 2-1:1.0: state 7 ports 8 chg 0000 evt 0020&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346621.468686] hub 2-1:1.0: port 5, status 0101, change 0001, 12 Mb/s&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346621.572203] hub 2-1:1.0: debounce: port 5: total 100ms stable 100ms status 0x101&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346621.583063] hub 2-1:1.0: port 5 not reset yet, waiting 10ms&lt;/P&gt;&lt;P&gt;&amp;lt;6&amp;gt;[346621.645204] usb 2-1.5: new full-speed USB device number 109 using ehci-pci&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346621.657255] hub 2-1:1.0: port 5 not reset yet, waiting 10ms&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346621.719205] usb 2-1.5: device descriptor read/64, error -32&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346621.883202] usb 2-1.5: device descriptor read/64, error -32&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346621.995199] hub 2-1:1.0: port 5 not reset yet, waiting 10ms&lt;/P&gt;&lt;P&gt;&amp;lt;6&amp;gt;[346622.057201] usb 2-1.5: new full-speed USB device number 110 using ehci-pci&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346622.120204] usb 2-1.5: device descriptor read/64, error -32&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346622.284204] usb 2-1.5: device descriptor read/64, error -32&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346622.396203] hub 2-1:1.0: port 5 not reset yet, waiting 10ms&lt;/P&gt;&lt;P&gt;&amp;lt;6&amp;gt;[346622.458175] usb 2-1.5: new full-speed USB device number 111 using ehci-pci&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346622.860054] usb 2-1.5: device not accepting address 111, error -32&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346622.871192] hub 2-1:1.0: port 5 not reset yet, waiting 10ms&lt;/P&gt;&lt;P&gt;&amp;lt;6&amp;gt;[346622.933188] usb 2-1.5: new full-speed USB device number 112 using ehci-pci&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346623.335161] usb 2-1.5: device not accepting address 112, error -32&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346623.335342] hub 2-1:1.0: unable to enumerate USB device on port 5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 02 Feb 2014 15:33:10 GMT</pubDate>
    <dc:creator>dev_null</dc:creator>
    <dc:date>2014-02-02T15:33:10Z</dc:date>
    <item>
      <title>USB k20_100: no TOKENDNE interrupt. Please help.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-k20-100-no-TOKENDNE-interrupt-Please-help/m-p/270710#M9157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I try to build my small home 3d printer, PCB is fully handmade and I use gentoo linux + manually built gnu toolchain + openocd for debugging. (JTAG debugger also is homemade based on FT2232D)&lt;/P&gt;&lt;P&gt;So everything is good and works, but I can't launch USB. I try to utilize &lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MEDICALUSB" title="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MEDICALUSB"&gt;USB Stack&lt;/A&gt; v 4.1.1. and started from "virtual com" and "printer" examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is usb is not enumerated by host. (output is below). While it seems all works. USB initialization finishes well, no hangs or something suspicious.&lt;/P&gt;&lt;P&gt;By debugging USB_ISR I found that first SETUP packet (request for device descriptor) doesn't happen. (I see Reset and then Sleep interrupts when plug a cable).&lt;/P&gt;&lt;P&gt;The error can be very simple and stupid... &lt;/P&gt;&lt;P&gt;Appreciate any ideas, ( some subtle bit in some register... anything what should be tuned for the controller). I noticed k20_100 is not on the list of supported controllers (while download the USB stack) but there are neighbor K40_100, K20_72.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional information and things I've checked:&lt;/P&gt;&lt;P&gt;Exact controller model: &lt;STRONG&gt;MK20DN512VLK10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;8 MHZ crystall oscillator, 96 MHz of PLL.&lt;/P&gt;&lt;P&gt;Divided by 2 frequency for USB.&lt;/P&gt;&lt;P&gt;External power supply. I connected USB 5V to VREGIN according to documentation.&lt;/P&gt;&lt;P&gt;Since I'm unable to run examples in "native" environment I just built them with CMake, guessing macro definitions and removing GPIO parts with LEDs.&lt;/P&gt;&lt;P&gt;I use only one interrupt 89 (IRQ 73). Are there any others needed ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output from &amp;gt;cat /proc/kmsg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346621.468490] hub 2-1:1.0: state 7 ports 8 chg 0000 evt 0020&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346621.468686] hub 2-1:1.0: port 5, status 0101, change 0001, 12 Mb/s&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346621.572203] hub 2-1:1.0: debounce: port 5: total 100ms stable 100ms status 0x101&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346621.583063] hub 2-1:1.0: port 5 not reset yet, waiting 10ms&lt;/P&gt;&lt;P&gt;&amp;lt;6&amp;gt;[346621.645204] usb 2-1.5: new full-speed USB device number 109 using ehci-pci&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346621.657255] hub 2-1:1.0: port 5 not reset yet, waiting 10ms&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346621.719205] usb 2-1.5: device descriptor read/64, error -32&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346621.883202] usb 2-1.5: device descriptor read/64, error -32&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346621.995199] hub 2-1:1.0: port 5 not reset yet, waiting 10ms&lt;/P&gt;&lt;P&gt;&amp;lt;6&amp;gt;[346622.057201] usb 2-1.5: new full-speed USB device number 110 using ehci-pci&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346622.120204] usb 2-1.5: device descriptor read/64, error -32&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346622.284204] usb 2-1.5: device descriptor read/64, error -32&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346622.396203] hub 2-1:1.0: port 5 not reset yet, waiting 10ms&lt;/P&gt;&lt;P&gt;&amp;lt;6&amp;gt;[346622.458175] usb 2-1.5: new full-speed USB device number 111 using ehci-pci&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346622.860054] usb 2-1.5: device not accepting address 111, error -32&lt;/P&gt;&lt;P&gt;&amp;lt;7&amp;gt;[346622.871192] hub 2-1:1.0: port 5 not reset yet, waiting 10ms&lt;/P&gt;&lt;P&gt;&amp;lt;6&amp;gt;[346622.933188] usb 2-1.5: new full-speed USB device number 112 using ehci-pci&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346623.335161] usb 2-1.5: device not accepting address 112, error -32&lt;/P&gt;&lt;P&gt;&amp;lt;3&amp;gt;[346623.335342] hub 2-1:1.0: unable to enumerate USB device on port 5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Feb 2014 15:33:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/USB-k20-100-no-TOKENDNE-interrupt-Please-help/m-p/270710#M9157</guid>
      <dc:creator>dev_null</dc:creator>
      <dc:date>2014-02-02T15:33:10Z</dc:date>
    </item>
  </channel>
</rss>

