<?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のトピックISP Mode LPC11u37</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/ISP-Mode-LPC11u37/m-p/548152#M13605</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rc51 on Thu Aug 14 18:21:22 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;, I’m attempting to trigger ISP mode from within my application using the following snippet that was obtained from reference code included with the AN11305v documentation…but the LPC never shows up as a mass storage device.&amp;nbsp; If you can point me to an app note or suggestion of what may be wrong, that would certainly help....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* This data must be global so it is not read from the stack */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;typedef void (*IAP)(uint32_t [], uint32_t []);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IAP iap_entry = (IAP)0x1fff1ff1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t command[5], result[4];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define init_msdstate() *((uint32_t *)(0x10000054)) = 0x0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* This function resets some microcontroller peripherals to reset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; hardware configuration to ensure that the USB In-System Programming module&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; will work properly. It is normally called from reset and assumes some reset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; configuration settings for the MCU.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Some of the peripheral configurations may be redundant in your specific&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void ReinvokeISP(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* make sure USB clock is turned on before calling ISP */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= 0x04000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* make sure 32-bit Timer 1 is turned on before calling ISP */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= 0x00400;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* make sure GPIO clock is turned on before calling ISP */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= 0x00040;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* make sure IO configuration clock is turned on before calling ISP */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= 0x10000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* make sure AHB clock divider is 1:1 */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SYSCON-&amp;gt;SYSAHBCLKDIV = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* Send Reinvoke ISP command to ISP entry point*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; command[0] = 57;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; init_msdstate(); /* Initialize Storage state machine */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* Set stack pointer to ROM value (reset default) This must be the last&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; piece of code executed before calling ISP, because most C expressions&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and function returns will fail after the stack pointer is changed. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; __set_MSP(*((uint32_t *)0x00000000));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* Enter ISP. We call "iap_entry" to enter ISP because the ISP entry is done&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; through the same command interface as IAP. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; iap_entry(command, result);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // Not supposed to come back!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is supposed to invoke ISP mode which should eventually enumerate as a mass storage device that can be seen from the host operating system connect via USB.&amp;nbsp; However, this does not seem to work as the device never shows up nor can it be found manually by searching for the VID/PID (1FC9:000F) described in the AN11305v document on USB In-System Programming. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:48:37 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:48:37Z</dc:date>
    <item>
      <title>ISP Mode LPC11u37</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/ISP-Mode-LPC11u37/m-p/548152#M13605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rc51 on Thu Aug 14 18:21:22 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;, I’m attempting to trigger ISP mode from within my application using the following snippet that was obtained from reference code included with the AN11305v documentation…but the LPC never shows up as a mass storage device.&amp;nbsp; If you can point me to an app note or suggestion of what may be wrong, that would certainly help....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* This data must be global so it is not read from the stack */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;typedef void (*IAP)(uint32_t [], uint32_t []);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IAP iap_entry = (IAP)0x1fff1ff1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t command[5], result[4];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define init_msdstate() *((uint32_t *)(0x10000054)) = 0x0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* This function resets some microcontroller peripherals to reset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; hardware configuration to ensure that the USB In-System Programming module&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; will work properly. It is normally called from reset and assumes some reset&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; configuration settings for the MCU.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Some of the peripheral configurations may be redundant in your specific&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void ReinvokeISP(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* make sure USB clock is turned on before calling ISP */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= 0x04000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* make sure 32-bit Timer 1 is turned on before calling ISP */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= 0x00400;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* make sure GPIO clock is turned on before calling ISP */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= 0x00040;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* make sure IO configuration clock is turned on before calling ISP */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= 0x10000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* make sure AHB clock divider is 1:1 */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_SYSCON-&amp;gt;SYSAHBCLKDIV = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* Send Reinvoke ISP command to ISP entry point*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; command[0] = 57;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; init_msdstate(); /* Initialize Storage state machine */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* Set stack pointer to ROM value (reset default) This must be the last&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; piece of code executed before calling ISP, because most C expressions&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and function returns will fail after the stack pointer is changed. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; __set_MSP(*((uint32_t *)0x00000000));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /* Enter ISP. We call "iap_entry" to enter ISP because the ISP entry is done&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; through the same command interface as IAP. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; iap_entry(command, result);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // Not supposed to come back!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is supposed to invoke ISP mode which should eventually enumerate as a mass storage device that can be seen from the host operating system connect via USB.&amp;nbsp; However, this does not seem to work as the device never shows up nor can it be found manually by searching for the VID/PID (1FC9:000F) described in the AN11305v document on USB In-System Programming. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:48:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/ISP-Mode-LPC11u37/m-p/548152#M13605</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:48:37Z</dc:date>
    </item>
  </channel>
</rss>

