<?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>MQX Software SolutionsのトピックRe: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740221#M17719</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean the MQX usb stack not support your u-disk, but bootload&amp;nbsp; usb code support? You can change another u-disk to verify that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2018 14:27:51 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2018-03-13T14:27:51Z</dc:date>
    <item>
      <title>USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740209#M17707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Afternoon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully someone can give me a pointer or two on the enumeration of &lt;STRONG&gt;USB0 on the k60.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brief background:&lt;/P&gt;&lt;P&gt;MQX Version: &lt;STRONG&gt;4.2 Not using process expert.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Custom board: using the k60 processor has been tested and the USB circuit works with our boot-loader fine.&lt;/P&gt;&lt;P&gt;Using &lt;STRONG&gt;USB Host.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every time i plug in a USB stick the KHCI task detects the usb as being attached and returns that it has been successful, but the&amp;nbsp;&lt;STRONG&gt;usb_host_mass_device_event&lt;/STRONG&gt; is not triggered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, it works fine &lt;STRONG&gt;with the debugger attached&lt;/STRONG&gt;, and i am able to get&amp;nbsp;&lt;STRONG&gt;usb_host_mass_device_event&lt;/STRONG&gt; to trigger as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect that the clock is not properly being enabled to the usb module without using the debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my BSP USB init.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me what I am overlooking?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_mqx_int _bsp_usb_io_init&lt;BR /&gt;(&lt;BR /&gt; void&lt;BR /&gt;)&lt;BR /&gt;{&lt;BR /&gt;&lt;EM&gt;#if PE_LDD_VERSION&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; /* USB clock is configured using CPU component */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* Check if peripheral is not used by Processor Expert USB_LDD component */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; if (PE_PeripheralUsed((uint32_t)USB0_BASE_PTR) == TRUE) {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; /* IO Device used by PE Component*/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; return IO_ERROR;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/**&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; * Workaround for Processor Expert as USB clock divider settings has been removed&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; * from __pe_initialize_hardware() and Cpu_SetClockConfiguration() functions&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; * Needs to be replaced by dynamic calculation of dividers.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; * SIM_CLKDIV2: USBDIV=1,USBFRAC=0&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; SIM_CLKDIV2 = (uint32_t)((SIM_CLKDIV2 &amp;amp; (uint32_t)~0x0DUL) | (uint32_t)0x02UL); /* Update USB clock prescalers */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#endif&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;/* Configure USB to be clocked from PLL */&lt;BR /&gt; &lt;STRONG&gt;SIM_SOPT2_REG(SIM_BASE_PTR) |= SIM_SOPT2_USBSRC_MASK | SIM_SOPT2_PLLFLLSEL_MASK;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;/* Enable USB-OTG IP clocking */&lt;BR /&gt; &lt;STRONG&gt;SIM_SCGC4_REG(SIM_BASE_PTR) |= SIM_SCGC4_USBOTG_MASK;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;/* USB D+ and USB D- are standalone not multiplexed one-purpose pins */&lt;BR /&gt; /* VREFIN for device is standalone not multiplexed one-purpose pin */&lt;/P&gt;&lt;P&gt;/* {{START_VM_MOD*/&lt;BR /&gt; /* Configure Port A28 as USBPower Switch Enable */&lt;BR /&gt; &lt;STRONG&gt;PORTA_PCR28 = PORT_PCR_MUX(1) | PORT_PCR_SRE_MASK; /* Slow slew rate */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; GPIOA_PSOR |= 1 &amp;lt;&amp;lt; 28; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; GPIOA_PDDR |= 1 &amp;lt;&amp;lt; 28; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; GPIOA_PCOR |= 1 &amp;lt;&amp;lt; 28; /* Enable USB Output voltage */&lt;/STRONG&gt;&lt;BR /&gt;/* END_VM_MOD}}*/&lt;/P&gt;&lt;P&gt;return MQX_OK;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2018 18:22:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740209#M17707</guid>
      <dc:creator>jasonscott</dc:creator>
      <dc:date>2018-03-08T18:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740210#M17708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also Here is the USB Host Init.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;not sure if im missing something here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_mqx_int _bsp_usb_host_init(struct usb_host_if_struct *usb_if)&lt;BR /&gt;{&lt;BR /&gt; _mqx_int result = _bsp_usb_io_init(); &lt;BR /&gt; &lt;BR /&gt; if (result != MQX_OK) return result;&lt;/P&gt;&lt;P&gt;/* Do not configure enable USB regulator for host */&lt;BR /&gt;// SIM_SOPT1_REG(SIM_BASE_PTR) |= SIM_SOPT1_USBREGEN_MASK;&lt;/P&gt;&lt;P&gt;/* reset USB CTRL register */&lt;BR /&gt; USB_USBCTRL_REG(USB0_BASE_PTR) = 0;&lt;/P&gt;&lt;P&gt;/* setup interrupt */&lt;BR /&gt; _bsp_int_init(INT_USB0, BSP_USB_INT_LEVEL, 0, TRUE);&lt;BR /&gt; &lt;BR /&gt; return MQX_OK;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2018 18:38:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740210#M17708</guid>
      <dc:creator>jasonscott</dc:creator>
      <dc:date>2018-03-08T18:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740211#M17709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Id also would like someone to confirm or deny that using the debugger can some how alter the clock settings because that is what i really believe is occurring, but can find no information to support this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2018 18:53:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740211#M17709</guid>
      <dc:creator>jasonscott</dc:creator>
      <dc:date>2018-03-09T18:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740212#M17710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would also like to mention that i am using the RTCS library as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I remember reading somewhere that using the RTC can cause issues with the usb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;still going strong on this issue though, but it is eating up alot of time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2018 21:10:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740212#M17710</guid>
      <dc:creator>jasonscott</dc:creator>
      <dc:date>2018-03-09T21:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740213#M17711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you mean your board work with debugger attached, but not debugging.&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;work with debugger attached, and&amp;nbsp; debugging.&lt;/P&gt;&lt;P&gt;Could you please clarify it?&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;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2018 06:50:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740213#M17711</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2018-03-12T06:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740214#M17712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you suspect RTCS may cause this issue , I would suggest you disable RTCS to check whether this issue still happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2018 06:56:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740214#M17712</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2018-03-12T06:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740215#M17713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I meant as in the debugger is attached and actively running &amp;amp; debugging the application through the KDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i do not run the application using the debugger, I can not the the USB to enumerate fully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also like to mention that the bootloader is bypassed when i use the debugger.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bootloader moves files from the USB to a SD card.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When that operation is complete it jumps to the application space.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have encountered no issues with the SD card, just on the USB side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2018 16:48:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740215#M17713</guid>
      <dc:creator>jasonscott</dc:creator>
      <dc:date>2018-03-12T16:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740216#M17714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will give this a try here in a bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought about doing this initially, but was not sure of the repercussions of doing so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me make the change and create a new build.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2018 16:51:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740216#M17714</guid>
      <dc:creator>jasonscott</dc:creator>
      <dc:date>2018-03-12T16:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740217#M17715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Disabling the RTC by setting&amp;nbsp;BSPCFG_ENABLE_RTCDEV to 0, did not fix this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still suspect either the while debugging another clock setting is used&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the debugger adds in extra clock cycles which allows enough time that the USB enumerates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2018 17:14:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740217#M17715</guid>
      <dc:creator>jasonscott</dc:creator>
      <dc:date>2018-03-12T17:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740218#M17716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So after thinking on this scenario a bit, i started to wonder.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the Bootloader enables the power to the usb by setting a GPIO pin high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORTA_PCR28 = PORT_PCR_MUX(1) | PORT_PCR_SRE_MASK; /* Slow slew rate */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GPIOA_PSOR |= 1 &amp;lt;&amp;lt; 28;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOA_PDDR |= 1 &amp;lt;&amp;lt; 28;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; GPIOA_PCOR |= 1 &amp;lt;&amp;lt; 28;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then it jumps to the application space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Power will be already applied to the usb before i enter the&amp;nbsp;_bsp_usb_io_init function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could this cause the current scenario i am seeing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made an attempt to reverse this by adding the following lines of code to the function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//Set Power on to 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;PORTA_PCR28 = PORT_PCR_MUX(1) | PORT_PCR_SRE_MASK;&lt;BR /&gt; GPIOA_PSOR &amp;amp;= ~(1 &amp;lt;&amp;lt; 28);&lt;BR /&gt; GPIOA_PDDR &amp;amp;= ~(1 &amp;lt;&amp;lt; 28);&lt;BR /&gt; GPIOA_PCOR &amp;amp;= ~(1 &amp;lt;&amp;lt; 28);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_time_delay(1000);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Set Power on to 1.&lt;/P&gt;&lt;P&gt;PORTA_PCR28 = PORT_PCR_MUX(1) | PORT_PCR_SRE_MASK;&lt;BR /&gt; GPIOA_PSOR |= 1 &amp;lt;&amp;lt; 28;&lt;BR /&gt; GPIOA_PDDR |= 1 &amp;lt;&amp;lt; 28;&lt;BR /&gt; GPIOA_PCOR |= 1 &amp;lt;&amp;lt; 28;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did not see any positive results in this test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still working on a resolution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I even went one step farther by simply toggling the USB power using.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (!lwgpio_init(&amp;amp;USB_POWER, BSP_USB_POWER, LWGPIO_DIR_OUTPUT, LWGPIO_VALUE_NOCHANGE))&lt;BR /&gt; {&lt;BR /&gt; printf("Initializing USB GPIO as output failed.\n");&lt;BR /&gt; _task_block();&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;lwgpio_set_functionality(&amp;amp;USB_POWER, BSP_USB_POWER_MUX_GPIO);&lt;/P&gt;&lt;P&gt;lwgpio_set_value(&amp;amp;USB_POWER, LWGPIO_VALUE_HIGH);&lt;/P&gt;&lt;P&gt;_time_delay(3000);&lt;/P&gt;&lt;P&gt;lwgpio_set_value(&amp;amp;USB_POWER, LWGPIO_VALUE_LOW);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was probably more of a hardware test, but it worked and i did see the power to the USB host pin go low before initializing it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, still did not get the usb to enumerate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2018 20:39:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740218#M17716</guid>
      <dc:creator>jasonscott</dc:creator>
      <dc:date>2018-03-12T20:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740219#M17717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest you check the following :&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; check the reset circuit.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; check whether the VCC pin in your debugger still power the board while debugging?&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; make a simple project, just toggle a GPIO, not in your usb project. capture waveform with a scope, can you get the expected result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 07:54:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740219#M17717</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2018-03-13T07:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740220#M17718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I checked the reset circuit and that is fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We also use this reset circuit to program FPGA's and that is fine as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) The VCC Pin for the debugger is actually disabled through the KDS debug configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) The toggling of the GPIO was done on my part to rule out a power issue for the USB. I probably confused you more with adding that last post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea why the USB would be fine for the bootloader and not fine for my main application?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would simply use the bootloader code for the USB, but it is not using the latest mqx and from what i can tell have different methods to enumerate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 13:38:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740220#M17718</guid>
      <dc:creator>jasonscott</dc:creator>
      <dc:date>2018-03-13T13:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740221#M17719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean the MQX usb stack not support your u-disk, but bootload&amp;nbsp; usb code support? You can change another u-disk to verify that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 14:27:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740221#M17719</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2018-03-13T14:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740222#M17720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried various different usb sticks and it does not seem to make a difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not think there is an issue with the USB type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There has to be something not configured correctly on my MQX 4.2 application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am just having trouble narrowing it down since the KHCI task is acknowledging the presence of the USB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It just will not enumerate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 14:32:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740222#M17720</guid>
      <dc:creator>jasonscott</dc:creator>
      <dc:date>2018-03-13T14:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: USB0 - K60 - MQX4.2 - Only works with debugger attached.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740223#M17721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We managed to get the USB working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For those who are interested, it was actually an easy fix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding the following line to the init_hardware before the _bsp_initialize_hardware() worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SIM_SCGC4_REG(SIM_BASE_PTR) &amp;amp;= ~SIM_SCGC4_USBOTG_MASK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im not sure why exactly this was the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The bootloader does enable the clock to the USB module, but i would have thought it would reset once the we initialized the bsp of our main application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is also possible to disable the clock using the same instruction in the bootloader before jumping to the application space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help and ideas Daniel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 12:49:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/USB0-K60-MQX4-2-Only-works-with-debugger-attached/m-p/740223#M17721</guid>
      <dc:creator>jasonscott</dc:creator>
      <dc:date>2018-03-15T12:49:41Z</dc:date>
    </item>
  </channel>
</rss>

