<?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 powering mechanism using non-KSDK components in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/USB-powering-mechanism-using-non-KSDK-components/m-p/393252#M2415</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;The power mechanism is controllable in Kinetis SDK components implementing Freescale USB Stack (check box available in fsl_usb_descriptor component) but I couldn't find it in other processor expert components like FSL_USB_STACK. It took me a while to figure out a way to control power mechanism of USB using non-SDK components.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;Powering mechanism is catered inside configuration descriptors in USB 2.0 standard. In FSL USB Stack, this is implemented in g_config_descriptor() function inside usb_descriptor.c and is enabled for all three powering options (Bus-powered, Self-powered and Remote wake-up). There is no option available in Processor Expert to change it to any specific powering option but once your code is generated from Processor Expert, you can simply update the code in usb_descriptor.c to enable any of the powering option you want:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;1. Open usb_descriptor.c file in Generated Code folder,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;2. In g_config_descriptor, change attributes from BUS_POWERED|SELF_POWERED|(REMOTE_WAKEUP_SUPPORT&amp;lt;&amp;lt;REMOTE_WAKEUP_SHIFT) to any single type to enable only that particular type.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;Feedback would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;Saad&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jun 2015 15:54:07 GMT</pubDate>
    <dc:creator>b51427</dc:creator>
    <dc:date>2015-06-11T15:54:07Z</dc:date>
    <item>
      <title>USB powering mechanism using non-KSDK components</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/USB-powering-mechanism-using-non-KSDK-components/m-p/393252#M2415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;The power mechanism is controllable in Kinetis SDK components implementing Freescale USB Stack (check box available in fsl_usb_descriptor component) but I couldn't find it in other processor expert components like FSL_USB_STACK. It took me a while to figure out a way to control power mechanism of USB using non-SDK components.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;Powering mechanism is catered inside configuration descriptors in USB 2.0 standard. In FSL USB Stack, this is implemented in g_config_descriptor() function inside usb_descriptor.c and is enabled for all three powering options (Bus-powered, Self-powered and Remote wake-up). There is no option available in Processor Expert to change it to any specific powering option but once your code is generated from Processor Expert, you can simply update the code in usb_descriptor.c to enable any of the powering option you want:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;1. Open usb_descriptor.c file in Generated Code folder,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;2. In g_config_descriptor, change attributes from BUS_POWERED|SELF_POWERED|(REMOTE_WAKEUP_SUPPORT&amp;lt;&amp;lt;REMOTE_WAKEUP_SHIFT) to any single type to enable only that particular type.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;Feedback would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px;"&gt;Saad&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 15:54:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/USB-powering-mechanism-using-non-KSDK-components/m-p/393252#M2415</guid>
      <dc:creator>b51427</dc:creator>
      <dc:date>2015-06-11T15:54:07Z</dc:date>
    </item>
  </channel>
</rss>

