<?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: Direct access to flash in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Direct-access-to-flash/m-p/571498#M20619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Wed Apr 06 01:26:01 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Suggest you read the IAP chapter in the user manual, which tells you how to use ROM functions to program the flash. As you have found, you cannot 'just write' to flash.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 22:31:38 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:31:38Z</dc:date>
    <item>
      <title>Direct access to flash</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Direct-access-to-flash/m-p/571497#M20618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by simm on Wed Apr 06 00:18:24 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to write directly to flash LPC1114 to address some volue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;eg.&amp;nbsp; *(uint32_t *) (0x00007FF0UL) = 0x1122;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But it doesn't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to save at specified address information about vesion of my Bootloader and application. This info must be read/write by bootloader or application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to save some volue in flash at specified address?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:31:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Direct-access-to-flash/m-p/571497#M20618</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Direct access to flash</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Direct-access-to-flash/m-p/571498#M20619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Wed Apr 06 01:26:01 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Suggest you read the IAP chapter in the user manual, which tells you how to use ROM functions to program the flash. As you have found, you cannot 'just write' to flash.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:31:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Direct-access-to-flash/m-p/571498#M20619</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Direct access to flash</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Direct-access-to-flash/m-p/571499#M20620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by simm on Thu Apr 07 04:43:35 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I use IAP functions but I have still a problem with saving value in Flash.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use function similar like in example with secendary bootloader but it doesn't work correcly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This function work only if I program application by Hyperterminal and use this function. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I want to save some value without programming app it doesn't work. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you know where is a problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*****************************************************************************/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;static uint32_t u32Bootloader_WriteVerInfo(uint16_t AssressWordOffset, uint32_t Value)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t ind;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t u32Result = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t a32DummyData[IAP_FLASH_PAGE_SIZE_WORDS];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t *pu32Mem = (uint32_t *)(APP_END_ADDR - IAP_FLASH_PAGE_SIZE_BYTES);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* First copy the data that is currently present in the last page of&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; flash into a temporary buffer */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for (ind = 0 ; ind &amp;lt; IAP_FLASH_PAGE_SIZE_WORDS; ind++)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a32DummyData[ind] = *pu32Mem++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ind=((VERINFO_ADDR &amp;amp; 0xFF)&amp;gt;&amp;gt;2) + AssressWordOffset;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a32DummyData[ind] = (uint32_t)Value;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if (u32IAP_PrepareSectors(APP_END_SECTOR, APP_END_SECTOR) == IAP_STA_CMD_SUCCESS)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Now write the data back */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (u32IAP_CopyRAMToFlash((APP_END_ADDR - IAP_FLASH_PAGE_SIZE_BYTES),(uint32_t)a32DummyData,IAP_FLASH_PAGE_SIZE_BYTES) == IAP_STA_CMD_SUCCESS)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Check that the write was successful */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (u32IAP_Compare((APP_END_ADDR - IAP_FLASH_PAGE_SIZE_BYTES),(uint32_t)a32DummyData, IAP_FLASH_PAGE_SIZE_BYTES, 0) == IAP_STA_CMD_SUCCESS)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;u32Result = 1;&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;return (u32Result);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:31:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Direct-access-to-flash/m-p/571499#M20620</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:31:39Z</dc:date>
    </item>
  </channel>
</rss>

