<?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: LPC1768 ISP problem in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-ISP-problem/m-p/649349#M25794</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way to debug that is, program a known good example "blinky" via SWD first, open the debugger memory windows (make sure your have VTOR register set correctly) to look at the flash content checksum field from 0x1C to 0x1F , then&amp;nbsp;use the hex editor (you&amp;nbsp;need to convert elf or axf file&amp;nbsp;to hex file first) to compare and insert the same checksum manually. Then, use your flash ISP to program this hex file into the flash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Mar 2017 18:33:13 GMT</pubDate>
    <dc:creator>Dezheng_Tang</dc:creator>
    <dc:date>2017-03-20T18:33:13Z</dc:date>
    <item>
      <title>LPC1768 ISP problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-ISP-problem/m-p/649346#M25791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on LPC1768 ISP application through LPC1768 UART commands.&lt;/P&gt;&lt;P&gt;I designed an external PCB with second MCU and SPI flash that receive form PC hex file to download in LPC1768 (the hex file is saved in SPI flash) and then wrote data in LCP1768 via ISP commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PC to second MCU protocol got CRC on command, so I'm quite sure hex file is transfered correctly inside SPI flash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I developed LPC ISP protocol and commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens is that I got "OK" for all LPC1768 ISP commands, but program is not running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My ISP commands sequence to download in LPC1768 flash is (ISP UART protocol is working because LPC1768 reply is always OK):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// binSize is the hex file size, in byte. Then I got needed sector count&lt;/P&gt;&lt;P&gt;flashNeededSectorCount = _get_flash_sector_index(binSize);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Set LPC1768 in ISP mode&lt;/P&gt;&lt;P&gt;lpc1768IspManagerEnterIspMode();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// LPC1768 baudrate syncro&lt;BR /&gt;lpc1768IspManagerBaudRateSyncro(uartBusPtr);&lt;/P&gt;&lt;P&gt;// Disasble echo&lt;BR /&gt;lpc1768IspManagerDisableEcho(uartBusPtr);&lt;/P&gt;&lt;P&gt;// UnLock&lt;BR /&gt;lpc1768IspManagerUnlock(uartBusPtr);&lt;/P&gt;&lt;P&gt;// Prepare needed sector&lt;BR /&gt;lpc1768IspManagerPrepareSector(uartBusPtr, 0, flashNeededSectorCount - 1);&lt;/P&gt;&lt;P&gt;// Erase needed sector&lt;BR /&gt;lpc1768IspManagerEraseSector(uartBusPtr, 0, flashNeededSectorCount - 1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Load program (flashAddress is LPC1768 write flash address)&lt;BR /&gt;for(flashAddress = 0; flashAddress &amp;lt; binSize; ) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Write to LPC1768 RAM data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lpc1768IspManagerWriteToRAM(uartBusPtr, 0x10000200 + (uint32_t)index, &amp;amp;binData[index], writeLen);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Prepare selected flash sector&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;flashSectorCount = _get_flash_sector_index(flashAddress);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lpc1768IspManagerPrepareSector(uartBusPtr, 0, flashSectorCount);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Copy from RAM to FLASH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lpc1768IspManagerCopyRAMToFlash(uartBusPtr, flashAddress, 0x10000200, sizeof(binData));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flashAddress += binDataLen;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; // Go &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lpc1768IspManagerGo(uartBusPtr, 0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; // Remove ISP mode &amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lpc1768Reset();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lpc1768RemoveForISP();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tommRoCOsDelayMsec(1500);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lpc1768RemoveReset();&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 08:34:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-ISP-problem/m-p/649346#M25791</guid>
      <dc:creator>davideferrario</dc:creator>
      <dc:date>2017-03-15T08:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1768 ISP problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-ISP-problem/m-p/649347#M25792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Davide,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please make sure that the *.hex file you are flashing to the MCU contains a valid image checksum, see this document for more information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/389046"&gt;https://community.nxp.com/thread/389046&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Carlos Mendoza&lt;BR /&gt;Technical Support Engineer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 23:17:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-ISP-problem/m-p/649347#M25792</guid>
      <dc:creator>Carlos_Mendoza</dc:creator>
      <dc:date>2017-03-16T23:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1768 ISP problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-ISP-problem/m-p/649348#M25793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I was missing the CHECKSUM; now I added it in HEX file and try to download file but still I have problems.&lt;BR /&gt;Question: for checksum, uint32_t data are written in l&lt;EM&gt;ittle-endian&lt;/EM&gt; or &lt;EM&gt;big-endian&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try both solutions and still bootloader never works; but I want to know to be sure of what I'm doing.&lt;/P&gt;&lt;P&gt;It's possible to have an example of CHECKSUM input 28 byte data array and output 32 byte data array?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 08:06:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-ISP-problem/m-p/649348#M25793</guid>
      <dc:creator>davideferrario</dc:creator>
      <dc:date>2017-03-20T08:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1768 ISP problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-ISP-problem/m-p/649349#M25794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way to debug that is, program a known good example "blinky" via SWD first, open the debugger memory windows (make sure your have VTOR register set correctly) to look at the flash content checksum field from 0x1C to 0x1F , then&amp;nbsp;use the hex editor (you&amp;nbsp;need to convert elf or axf file&amp;nbsp;to hex file first) to compare and insert the same checksum manually. Then, use your flash ISP to program this hex file into the flash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 18:33:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-ISP-problem/m-p/649349#M25794</guid>
      <dc:creator>Dezheng_Tang</dc:creator>
      <dc:date>2017-03-20T18:33:13Z</dc:date>
    </item>
  </channel>
</rss>

