<?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: Kinetis K20 USB device descriptor returns nulls in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227469#M4622</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The descriptors are in flash, should have mentioned this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using MK20DN512ZVLQ10, 100MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using external 4MHz resonator to generate a core clock of 48MHz (i have basically tried to copy the settings from the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;USB_MS_Device &lt;/SPAN&gt;project).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are going to look at the accuracy of the 48MHz today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, many thanks for your suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Feb 2014 09:18:38 GMT</pubDate>
    <dc:creator>leccy</dc:creator>
    <dc:date>2014-02-14T09:18:38Z</dc:date>
    <item>
      <title>Kinetis K20 USB device descriptor returns nulls</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227465#M4618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have incorporated the Processor Expert K20 tower example project USB_MS_Device into our project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With our device running, connecting a USB cable causes what appear to be correct resets/suspensions (viewed on Ellysis USB explorer).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Host PC asks for device descriptor - our reply is correctly formed and can be followed on debug to USB_LDD_DeviceQueueDataPacket() in USB_LDD.c with what appears to be the correct data in the buffer to be sent (the first byte can be seen in debug as 0x12).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The USB analyzer shows the reply payload to be all nulls, and the PC shows 'USB device not recognized'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can run the K60 tower example project without problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our USB D+ and D- lines are attached directly to the K20 via 30ohm resistors as per K60 tower.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Processor Expert components were copied from the example project to our project.&lt;/P&gt;&lt;P&gt;K20 component bus timings were altered to accommodate our 4MHz external crystal, USB clock setting shows 48MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas why we might see nulls as the payload data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 13:55:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227465#M4618</guid>
      <dc:creator>leccy</dc:creator>
      <dc:date>2014-02-12T13:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K20 USB device descriptor returns nulls</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227466#M4619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the descriptor that you want to transfer located in RAM or in Flash?&lt;/P&gt;&lt;P&gt;If it is in Flash and you use a Rev. 2 K20 part (eg. 120MHz part) you will need to ensure that the USB controller has rights to access it (otherwise it will send 'rubbish').&lt;/P&gt;&lt;P&gt;If this is the case you need to set&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;MPU_CESR = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;// allow concurrent access to MPU controller&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 01:20:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227466#M4619</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-02-13T01:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K20 USB device descriptor returns nulls</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227467#M4620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply Mark.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;MPU_CESR is set to 0 on start-up.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;On debugger, it does seem that the data is ready to be sent, pointers in routine USB_LDD_DeviceQueueDataPacket() do appear to be set to correct data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Data is sent by the routine and can be seen on the USB sniffer as a packet, except that it is all zeros!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Alex&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 09:42:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227467#M4620</guid>
      <dc:creator>leccy</dc:creator>
      <dc:date>2014-02-13T09:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K20 USB device descriptor returns nulls</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227468#M4621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You didn't say whether the data pointer was to a buffer in RAM or Flash. With the MPU_CESR set to 0 it shouldn't make any difference though.&lt;/P&gt;&lt;P&gt;I have used the USB device mode successfully on all Kl and K processor types (with USB) without any differences in the driver code (apart from the clock register setting) so don't have any other explanation at the moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also it is not clear which K20 you are using. If it is a 50MHz, 72MHz,100MHz or 120MHz version? What core clock rate do you have? If you are deriving the USB clock from it, are you sure that the 48MHz accuracy is ensured?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a number of USB-MSD images here: &lt;A href="http://www.utasker.com/SW_Demos.html#K70" title="http://www.utasker.com/SW_Demos.html#K70"&gt;http://www.utasker.com/SW_Demos.html#K70&lt;/A&gt;&lt;/P&gt;&lt;P&gt;which can be used to verify that the HW is OK - in case you find one there matching your board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 23:39:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227468#M4621</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-02-13T23:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K20 USB device descriptor returns nulls</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227469#M4622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The descriptors are in flash, should have mentioned this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using MK20DN512ZVLQ10, 100MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using external 4MHz resonator to generate a core clock of 48MHz (i have basically tried to copy the settings from the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;USB_MS_Device &lt;/SPAN&gt;project).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are going to look at the accuracy of the 48MHz today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, many thanks for your suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 09:18:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227469#M4622</guid>
      <dc:creator>leccy</dc:creator>
      <dc:date>2014-02-14T09:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K20 USB device descriptor returns nulls</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227470#M4623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still suspect that the USB controller is not being allowed to access the Flash since I don't expect small deviations in the clocks to cause such an effect.&lt;/P&gt;&lt;P&gt;To exclude this, I would copy the data (in the single test case) from Flash to a RAM buffer and then see whether this transaction is correct. Depending on the result you will know where to investigate more closely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 11:10:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227470#M4623</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-02-14T11:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K20 USB device descriptor returns nulls</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227471#M4624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are spot-on.&amp;nbsp; Moved the Device Descriptor to RAM, and all Device Descriptor requests reply with good data, all other requests still return nulls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you suggest where else to look to configure the USB controller to access FLASH?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 11:59:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227471#M4624</guid>
      <dc:creator>leccy</dc:creator>
      <dc:date>2014-02-14T11:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K20 USB device descriptor returns nulls</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227472#M4625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking at another post, it is possible to enable flash access for the USB by setting &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;M4AP bits in the FMC_PFAPR register.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our device now enumerates correctly with USB descriptors in flash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Complicated little beastie...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 14:08:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227472#M4625</guid>
      <dc:creator>leccy</dc:creator>
      <dc:date>2014-02-14T14:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Kinetis K20 USB device descriptor returns nulls</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227473#M4626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to appologise since I oversaw this detail when I originally responded, although it is indeed needed (as well) for flash access.&lt;/P&gt;&lt;P&gt;You will however see, in case you do this on different processor types, that the bus master number is not always 4. In case you use a type with FPU it is then 3, if you use a K20-50M type it is also 3, and if you use HS USB on a K61/70 it will be bus master 6.&lt;BR /&gt;In the case of KL devices there is no FMC, so it then shouldn't be done...their USB controllers can always access Flash...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 22:28:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Kinetis-K20-USB-device-descriptor-returns-nulls/m-p/227473#M4626</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-02-14T22:28:43Z</dc:date>
    </item>
  </channel>
</rss>

