<?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のトピックRe: LPC18xx failed to use IAP programming</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525441#M8077</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mc on Wed Jun 17 14:12:33 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi capiman,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is memory starting address from 0x1008 0000. This memory bank is present on all devices. I will be added in UM.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:15:36 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:15:36Z</dc:date>
    <item>
      <title>LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525424#M8060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CH Wu on Thu May 22 02:38:56 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the periph_flashiap sample code of lpcopen_2_12_keil_iar_keil_mcb_1857 with the Keil MCB1800 demo board.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I always failed at erase sector. I think the sample code should be ok, right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you help me to solve this issue?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Erase the last sector */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ret_code = Chip_IAP_EraseSector(IAP_LAST_SECTOR, IAP_LAST_SECTOR, IAP_FLASH_BANK_A);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CH Wu&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525424#M8060</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525425#M8061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by embd02161991 on Fri May 23 12:34:05 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The sample code for IAP in lpcware.com should work correctly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Download the example packages for Keil MCB1800 (LPC1857) board from :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fnxpfile%2Flpcopen-software-development-platform-lpc18xx-packages-0" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc18xx-packages-0&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please check the following.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Make sure you disable the interrupts before performing the erase operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. The sector has to be prepared before performing an write/erase operation .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NXP Technical Support&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525425#M8061</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525426#M8062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CH Wu on Sun May 25 18:57:51 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did follow the steps for the IAP testing but it doesn't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I downloaded the sample code(lpcopen_2_04_keil_iar_keil_mcb_1857) from LPCWARE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It built and downloaded successfully but always hanging on erase sector section.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The sample code has disable interrupt(__disable_irq();).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried this on MCB4300 and MCB1800 EVBs but got sample result.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have any idea?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;int main(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;int i;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint8_t ret_code;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t part_id;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Generic Initialization */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SystemCoreClockUpdate();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Board_Init();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Board_LED_Set(0, false);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Enable SysTick Timer */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SysTick_Config(SystemCoreClock / TICKRATE_HZ);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Initialize the array data to be written to FLASH */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for (i = 0; i &amp;lt; ARRAY_ELEMENTS; i++) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;src_iap_array_data&lt;/SPAN&gt;&lt;I&gt; = 0x11223340 + i;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/* Read Part Identification Number*/&lt;BR /&gt;part_id = Chip_IAP_ReadPID();&lt;BR /&gt;DEBUGOUT("Part ID is: %x\r\n", part_id);&lt;BR /&gt;&lt;BR /&gt;/* Disable interrupt mode so it doesn't fire during FLASH updates */&lt;BR /&gt;__disable_irq();&lt;BR /&gt;&lt;BR /&gt;/* IAP Flash programming */&lt;BR /&gt;/* Prepare to write/erase the last sector */&lt;BR /&gt;ret_code = Chip_IAP_PreSectorForReadWrite(IAP_LAST_SECTOR, IAP_LAST_SECTOR, IAP_FLASH_BANK_A);&lt;BR /&gt;&lt;BR /&gt;/* Error checking */&lt;BR /&gt;if (ret_code != IAP_CMD_SUCCESS) {&lt;BR /&gt;DEBUGOUT("Command failed to execute, return code is: %x\r\n", ret_code);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/* Erase the last sector */&lt;BR /&gt;ret_code = Chip_IAP_EraseSector(IAP_LAST_SECTOR, IAP_LAST_SECTOR, IAP_FLASH_BANK_A);&lt;BR /&gt;&lt;BR /&gt;/* Error checking */&lt;BR /&gt;if (ret_code != IAP_CMD_SUCCESS) {&lt;BR /&gt;DEBUGOUT("Command failed to execute, return code is: %x\r\n", ret_code);&lt;BR /&gt;} &lt;/I&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525426#M8062</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525427#M8063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cfb on Thu May 29 05:51:13 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Which of your DEBUGOUT statements traps the error and what is the error code returned?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525427#M8063</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525428#M8064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Kaveh.Firouzi on Tue Aug 26 14:45:28 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am facing the exact same problem, were you able to fix the issue? I'd appreciate it if you could please let me know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kaveh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525428#M8064</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525429#M8065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by xianghuiwang on Mon Sep 08 09:55:19 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are able to duplicate this issue. We will do some checking on this sample code and get back to you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525429#M8065</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525430#M8066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lonwalker on Thu Oct 16 09:08:15 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Any answer to these questions?&amp;nbsp;&amp;nbsp; I am having similar issues getting the same example thing working here with my LPC824 board design.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525430#M8066</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525431#M8067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by loose_cannon on Wed Oct 29 16:18:19 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe the IAP API uses the top 32-bytes of the first 32K RAM segment.&amp;nbsp; Did you remember to offset or move the stack pointer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525431#M8067</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525432#M8068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mc on Wed Oct 29 17:22:28 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi all &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IAP init code is required before using erase command. It is not there in LPCOpen example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you please also add below IAP init code in your project and let us know the result?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;uint8_t Chip_IAP_init(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t command[5], result[4];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;command[0] = 49;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;iap_entry(command, result);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return result[0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;int main(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;int i=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint8_t ret_code;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SystemCoreClockUpdate();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Board_Init();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;__disable_irq();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ret_code = Chip_IAP_init();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Error checking */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (ret_code != IAP_CMD_SUCCESS) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DEBUGOUT("Command failed to execute, return code is: %x\r\n", ret_code);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Re-enable interrupt mode */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__enable_irq();&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525432#M8068</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525433#M8069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by loose_cannon on Tue Nov 04 17:09:00 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you, The IAP_init fixed problems I started having.&amp;nbsp; I think there is some confusion here because, what I found is: the init is not required when the program is downloaded using the JTAG debugger to start a debug session, but is required if the program is loaded using another method such as the command line flash tool:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Ffaq%2Flpcxpresso%2Fcommand-line-flash-programming" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/faq/lpcxpresso/command-line-flash-programming&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is probably why it was missing from the example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525433#M8069</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525434#M8070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by hhuwjb on Fri Nov 07 20:06:08 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi all&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use the IAP to read partID on LPC4357, but it hang on here everytime : &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; IAP_Init();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone tell me where is wrong ,Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IAP.c:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;typedef void&amp;nbsp; (*IAP) (unsigned int [],unsigned int[]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IAP iap_entry =(IAP)0x10400100;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned long command[6] = {0,0,0,0,0,0};&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned long result[5]= {0,0,0,0,0};&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned long IAP_Init(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;command[0]=IAP_CMD_Init;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;iap_entry(command,result);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return result[0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned long IAP_ReadParID (unsigned long * PartID)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;command[0] = IAP_CMD_ReadParID;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;iap_entry(command, result);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*PartID = result[1];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;return result[0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;APP.c:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;__disable_irq();&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt; IAP_Init();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;__enable_irq();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__disable_irq();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IAP_ReadParID(&amp;amp;id[0]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__enable_irq();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-----------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Need your help,Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525434#M8070</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525435#M8071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MikeSimmonds on Sat Nov 08 06:11:12 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Firstly, please use the code block facility when posting your code snippets.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your problem is that you do not setup iap_entry correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From user manual .&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;#define IAP_LOCATION *(volatile unsigned int *)(0x10400100);
typedef void (*IAP)(unsigned int [],unsigned int[]); &lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I.e. you missed one level of indirection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Therefore you are trying to execute the pointer value as if it were a code address; ** Usage Fault **&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HTH -- Mike.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525435#M8071</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525436#M8072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by hhuwjb on Sat Nov 08 07:33:41 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your reply Mike!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried the user manual's code, turns out some errors&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;
#define IAP_LOCATION&amp;nbsp; *(volatile unsigned int *)(0x10400100);
typedef void&amp;nbsp; (*IAP) (unsigned long [],unsigned long[]);
IAP iap_entry=(IAP)IAP_LOCATION;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //error comes from here
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here is the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
..\..\..\..\IAP\IAP.c(19): error:&amp;nbsp; #28: expression must have a constant value
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use the keil 4.54 as&amp;nbsp; my debuger&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And I realized that the IAP entry is not in&amp;nbsp; address 0x10400100, rather this address is just the Point to IAP_entry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I found the value in 0x10400100 is 0x10408581, so can I directly access 0x10408581?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again for your reply,Mike. And if you know what is wrong with my code please let me know.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525436#M8072</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525437#M8073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by hhuwjb on Sat Nov 08 23:31:10 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Now is working properly. I use the following code instead &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;
#define IAP_LOCATION&amp;nbsp; *(volatile unsigned int *)0x10400100 
#define iap_entry(a, b)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((void (*)())(IAP_LOCATION))(a, b)
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for pointing out my mistake, guys&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525437#M8073</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525438#M8074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by JensNilsson on Mon Feb 16 09:39:17 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I got the same issue as the others mentioned in this thread and doing the IAP Init command seems to have fixed it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However for me the IAP Init function does never return any value. The result[4] array from your code is never manipulated and therefor it never returns&amp;nbsp; IAP_CMD_SUCCESS if I don't assign it before the call. Just wondering if I should be worried about it or not?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also I would like to have it clarified which part of the specified "top 32 bytes of RAM" means, as in which RAM area it actually uses. We're using a LPC1812 in our product that contains 4 different RAM areas. So I would like to know which one I should avoid using the top 32 bytes in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jens Nilsson&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525438#M8074</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525439#M8075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Mon Feb 16 12:10:10 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The IAP uses RAM in the main (first) RAM bank.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso Support&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525439#M8075</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525440#M8076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by capiman on Mon Feb 16 12:22:15 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;@LPCXpresso Support&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you confirm this is the memory area starting at 0x10000000?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And the exact position is dependant on the part, because memory there has different size in parts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you add this important info (perhaps with memory start address of the RAM area) to the LPC18xx and LPC43xx User Manual?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525440#M8076</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: LPC18xx failed to use IAP programming</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525441#M8077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mc on Wed Jun 17 14:12:33 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi capiman,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is memory starting address from 0x1008 0000. This memory bank is present on all devices. I will be added in UM.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:15:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC18xx-failed-to-use-IAP-programming/m-p/525441#M8077</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:15:36Z</dc:date>
    </item>
  </channel>
</rss>

