<?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: BSP setting for USB in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/BSP-setting-for-USB/m-p/196877#M4143</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agreed -- Embedding this Processor Expert-generated code into an OS release is 'not friendly', especially with all the embedded hard-constants, for ANY user not tied-in with their CodeWarrior toolset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Jun 2012 07:41:50 GMT</pubDate>
    <dc:creator>egoodii</dc:creator>
    <dc:date>2012-06-02T07:41:50Z</dc:date>
    <item>
      <title>BSP setting for USB</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/BSP-setting-for-USB/m-p/196873#M4139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a custom board with CW10, MQX 3.8 and K60N512 processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this board I have successfully worked with MQX 3.7. Now that I ported all custom drivers to MQX 3.8, everything is ok except the USB. I cloned the BSP twrk60n512 and I modified the line 58 in the bsp_cm.h file from&lt;/P&gt;&lt;PRE&gt;#define CPU_XTAL_CLK_HZ                 0x02FAF080U /* Value of the external crystal or oscillator clock frequency in Hz */&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;PRE&gt;#define CPU_XTAL_CLK_HZ                 0x016E3600U /* Value of the external crystal or oscillator clock frequency in Hz */&lt;/PRE&gt;&lt;P&gt;(my external clock is 24 MHz instead of 50 MHz as in the twrk60n512 board)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I insert the USB cable in the PC port the device is not recognized, even if leave the 50 MHz define.&lt;/P&gt;&lt;P&gt;The only way I found to make the USB work is to set the SIM_CLKDIV2.USBDIV field to 0 instead of 1 in the Cpu_SetClockConfiguration function: I modified the line 717 in the bsp_cm.c file from&lt;/P&gt;&lt;PRE&gt;      SIM_CLKDIV2 = (uint32_t)((SIM_CLKDIV2 &amp;amp; (uint32_t)~0x0DUL) | (uint32_t)0x02UL); /* Update USB clock prescalers */&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;PRE&gt;      SIM_CLKDIV2 = (uint32_t)(SIM_CLKDIV2 &amp;amp; (uint32_t)~0x0FUL); /* Update USB clock prescalers */&lt;/PRE&gt;&lt;P&gt;Am I right or do I have to modifiy other things?&lt;/P&gt;&lt;P&gt;Any other advice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Teckna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 21:39:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/BSP-setting-for-USB/m-p/196873#M4139</guid>
      <dc:creator>Teckna</dc:creator>
      <dc:date>2012-01-11T21:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: BSP setting for USB</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/BSP-setting-for-USB/m-p/196874#M4140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The USB requires 48MHz clock. Hence you need to&amp;nbsp; USBFRAC=1 and USBDIV=0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohsin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 22:22:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/BSP-setting-for-USB/m-p/196874#M4140</guid>
      <dc:creator>Mohsin455</dc:creator>
      <dc:date>2012-01-11T22:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: BSP setting for USB</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/BSP-setting-for-USB/m-p/196875#M4141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The easiest way for you when you are using CodeWarrior would be to setup your clock settings using Processor Expert.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can follow descriprion in "...Freescale MQX 3.8\doc\tools\cw\Howto_SetupKinetisClock_UsingPE.pdf"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 23:49:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/BSP-setting-for-USB/m-p/196875#M4141</guid>
      <dc:creator>petr_uhlir</dc:creator>
      <dc:date>2012-01-11T23:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: BSP setting for USB</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/BSP-setting-for-USB/m-p/196876#M4142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need USBFRAC=0 and USBDIV=1 as for twrk60n512 bsp, but i need to modifiy the values written in the MCG_C5.PRDIV field in the bsp_cm.c file (fclk = 50 MHz =&amp;gt; PRDIV = 0x18 resulting in 2 MHz in twrk60n512 bsp, fclk = 24 MHz =&amp;gt; PRDIV = 0x0B resulting in same 2 MHz in my custom bsp).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In MQX 3.7 this value was set depending on the macro value representing external clock frequency, in MQX is written directly in the code: why this mechanism has been depreceted, while it is so useful?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Teckna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2012 01:10:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/BSP-setting-for-USB/m-p/196876#M4142</guid>
      <dc:creator>Teckna</dc:creator>
      <dc:date>2012-01-12T01:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: BSP setting for USB</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/BSP-setting-for-USB/m-p/196877#M4143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agreed -- Embedding this Processor Expert-generated code into an OS release is 'not friendly', especially with all the embedded hard-constants, for ANY user not tied-in with their CodeWarrior toolset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jun 2012 07:41:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/BSP-setting-for-USB/m-p/196877#M4143</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2012-06-02T07:41:50Z</dc:date>
    </item>
  </channel>
</rss>

