<?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>LPC MicrocontrollersのトピックLPC11U68: rapid USB re-enumerations when calling mass storage device bootloader</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-rapid-USB-re-enumerations-when-calling-mass-storage/m-p/535216#M10959</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by danblumenfeld on Fri Mar 18 07:57:42 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello, all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My name is Dan...I'm new to micro development, as well as to LPCWare, so I apologize if I've missed anything obvious.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;I'm attempting to put together a proof-of-concept, demonstrating the ability to update the firmware via the USB mass storage emulation for ISP. I started with the application note and sample code found here: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fnxpfile%2Fan11305-usb-system-programming-lpc11u3xlpc11u2x" rel="nofollow noopener noreferrer" target="_blank"&gt;https://www.lpcware.com/content/nxpfile/an11305-usb-system-programming-lpc11u3xlpc11u2x&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm developing in the LPCXpresso IDE, v8.0.0 [Build 526] [2015-11-23], on a Windows 10 desktop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I debug it through the IDE with the USB cable plugged into the link, it appears to function correctly; gets as far as the call to IAP_Entry and executes. Nothing enumerates, though, presumably because I'm connected to link not target.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I run it with the USB cable plugged into the target, I see flickering in Explorer's notification tray and in Device Manager, and hear repeated USB enumeration notification sounds. Occasionally, a new drive briefly shows in Explorer, but immediately vanishes. Device Manager lists a disconnected disk drive called "NXP LPC1XXX IFLASH USB Device", which I assume is the mass storage ISP device.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My current code, as simplified as possible (based on LPCOpen projects), is as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;I&gt;Includes lpc_board_nxp_lpcxpresso_11u68 library&lt;/I&gt;&lt;BR /&gt;&lt;I&gt;Includes lpc_chip_11u68 library&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Three source files:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;sysinit.c&lt;/STRONG&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Copied unchanged from LPCOpen&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;cr_startup_lpc11u.c&lt;/STRONG&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Copied unchanged from LPCOpen&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Main.c&lt;/STRONG&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#include "board.h"

/* This data must be global so it is not read from the stack */
#define IAP_ENTRY_LOCATION&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0X1FFF1FF1
typedef void (*IAP_ENTRY_T)(unsigned int[5], unsigned int[4]);

void IAP_Entry(unsigned int cmd_param[5], unsigned int status_result[4])
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; ((IAP_ENTRY_T) IAP_ENTRY_LOCATION)(cmd_param, status_result);
}
void ReinvokeISP(void)
{
uint32_t command[5], result[4];

SCB-&amp;gt;VTOR = 0; //Resets vector table offset
LPC_SYSCTL-&amp;gt;SYSAHBCLKCTRL |= 0x14440; //USB clock(0x04000), 32-bit timer(0x00400), GPIO clock(0x00040), and IO config clock(0x10000) must all be on
LPC_SYSCTL-&amp;gt;SYSAHBCLKDIV = 1; //make sure AHB clock divider is 1:1

command[0] = 57; //Reinvoke ISP command
IAP_Entry(command, result);
}

/* Main Program */
int main()
{
ReinvokeISP();
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An image of my board and jumpers is attached.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions for something obvious I'm doing wrong, or how best to diagnose the problem? It feels as if the device is continuously resetting itself into the USB ISP mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for any help you can provide this novice. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--Dan&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:35:32 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:35:32Z</dc:date>
    <item>
      <title>LPC11U68: rapid USB re-enumerations when calling mass storage device bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-rapid-USB-re-enumerations-when-calling-mass-storage/m-p/535216#M10959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by danblumenfeld on Fri Mar 18 07:57:42 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello, all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My name is Dan...I'm new to micro development, as well as to LPCWare, so I apologize if I've missed anything obvious.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;I'm attempting to put together a proof-of-concept, demonstrating the ability to update the firmware via the USB mass storage emulation for ISP. I started with the application note and sample code found here: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fnxpfile%2Fan11305-usb-system-programming-lpc11u3xlpc11u2x" rel="nofollow noopener noreferrer" target="_blank"&gt;https://www.lpcware.com/content/nxpfile/an11305-usb-system-programming-lpc11u3xlpc11u2x&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm developing in the LPCXpresso IDE, v8.0.0 [Build 526] [2015-11-23], on a Windows 10 desktop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I debug it through the IDE with the USB cable plugged into the link, it appears to function correctly; gets as far as the call to IAP_Entry and executes. Nothing enumerates, though, presumably because I'm connected to link not target.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I run it with the USB cable plugged into the target, I see flickering in Explorer's notification tray and in Device Manager, and hear repeated USB enumeration notification sounds. Occasionally, a new drive briefly shows in Explorer, but immediately vanishes. Device Manager lists a disconnected disk drive called "NXP LPC1XXX IFLASH USB Device", which I assume is the mass storage ISP device.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My current code, as simplified as possible (based on LPCOpen projects), is as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;I&gt;Includes lpc_board_nxp_lpcxpresso_11u68 library&lt;/I&gt;&lt;BR /&gt;&lt;I&gt;Includes lpc_chip_11u68 library&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Three source files:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;sysinit.c&lt;/STRONG&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Copied unchanged from LPCOpen&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;cr_startup_lpc11u.c&lt;/STRONG&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Copied unchanged from LPCOpen&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Main.c&lt;/STRONG&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#include "board.h"

/* This data must be global so it is not read from the stack */
#define IAP_ENTRY_LOCATION&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0X1FFF1FF1
typedef void (*IAP_ENTRY_T)(unsigned int[5], unsigned int[4]);

void IAP_Entry(unsigned int cmd_param[5], unsigned int status_result[4])
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; ((IAP_ENTRY_T) IAP_ENTRY_LOCATION)(cmd_param, status_result);
}
void ReinvokeISP(void)
{
uint32_t command[5], result[4];

SCB-&amp;gt;VTOR = 0; //Resets vector table offset
LPC_SYSCTL-&amp;gt;SYSAHBCLKCTRL |= 0x14440; //USB clock(0x04000), 32-bit timer(0x00400), GPIO clock(0x00040), and IO config clock(0x10000) must all be on
LPC_SYSCTL-&amp;gt;SYSAHBCLKDIV = 1; //make sure AHB clock divider is 1:1

command[0] = 57; //Reinvoke ISP command
IAP_Entry(command, result);
}

/* Main Program */
int main()
{
ReinvokeISP();
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An image of my board and jumpers is attached.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions for something obvious I'm doing wrong, or how best to diagnose the problem? It feels as if the device is continuously resetting itself into the USB ISP mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for any help you can provide this novice. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--Dan&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:35:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-rapid-USB-re-enumerations-when-calling-mass-storage/m-p/535216#M10959</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U68: rapid USB re-enumerations when calling mass storage device bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-rapid-USB-re-enumerations-when-calling-mass-storage/m-p/535217#M10960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 01:05:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-rapid-USB-re-enumerations-when-calling-mass-storage/m-p/535217#M10960</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-19T01:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U68: rapid USB re-enumerations when calling mass storage device bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-rapid-USB-re-enumerations-when-calling-mass-storage/m-p/535218#M10961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan, have you fixed your issue? I might have the same issue but I have not idea what is going on...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 15:17:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U68-rapid-USB-re-enumerations-when-calling-mass-storage/m-p/535218#M10961</guid>
      <dc:creator>oliviermartin</dc:creator>
      <dc:date>2016-11-02T15:17:53Z</dc:date>
    </item>
  </channel>
</rss>

