<?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: How to read data from a specific Flash address in order write it on a variable</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-data-from-a-specific-Flash-address-in-order-write-it/m-p/563541#M16694</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bonds22 on Sun Apr 12 14:22:26 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Here comes the problem: How do I read that value which is stored the flash address 0xC00?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:03:29 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:03:29Z</dc:date>
    <item>
      <title>How to read data from a specific Flash address in order write it on a variable</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-data-from-a-specific-Flash-address-in-order-write-it/m-p/563538#M16691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Burkhard on Tue Jun 17 08:55:30 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear programers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to use the LPC810M021FN8 for a new application. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In order to save the state of the device before turning it off I save that state to the flash page which starts with the address 0xC00. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here comes the problem: How do I read that value which is stored the flash address 0xC00?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any easy to understand C code would be much appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;I use for writing the state to the address this code: &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%2Fforum%2Feeprom-emulation" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/eeprom-emulation&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Burkhard&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:03:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-data-from-a-specific-Flash-address-in-order-write-it/m-p/563538#M16691</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to read data from a specific Flash address in order write it on a variable</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-data-from-a-specific-Flash-address-in-order-write-it/m-p/563539#M16692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by starblue on Tue Jun 17 09:27:09 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This is just part of the normal memory, so you can for example access it via a pointer, or use memcpy to copy it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:03:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-data-from-a-specific-Flash-address-in-order-write-it/m-p/563539#M16692</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to read data from a specific Flash address in order write it on a variable</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-data-from-a-specific-Flash-address-in-order-write-it/m-p/563540#M16693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Helmut Stettmaier on Tue Jul 29 04:58:41 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello Burkhard,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To locate a parameter block into the flash memory and read it randomly I suggest to declare the structure of the block and place a variable of this structure at the location in flash as desired.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is done in 3 steps:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- declare sthe structure as usual,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- place a variable of this structure in a section, and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- locate the section at the desired location&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is code which currently works:&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;const __attribute__ ((section(".param_page"))) struct sParams {
uint8_tsize;///&amp;lt; size of this struct
// more stuff
int16_t altAlarm;///&amp;lt; Altitude (lower boundary) when an alarm shall be generated
} Params;
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the IDE click or select:&amp;nbsp; Project|Properties|C/C++Build|Settings|MCU Linker|Miscellanous&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Add the linker control: --section-start=.param_page=0x3f80&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This allows you to read any value, e.g. Params.altAlarm .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards, Helmut&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:03:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-data-from-a-specific-Flash-address-in-order-write-it/m-p/563540#M16693</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to read data from a specific Flash address in order write it on a variable</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-data-from-a-specific-Flash-address-in-order-write-it/m-p/563541#M16694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bonds22 on Sun Apr 12 14:22:26 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Here comes the problem: How do I read that value which is stored the flash address 0xC00?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:03:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-data-from-a-specific-Flash-address-in-order-write-it/m-p/563541#M16694</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to read data from a specific Flash address in order write it on a variable</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-data-from-a-specific-Flash-address-in-order-write-it/m-p/563542#M16695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Sun Apr 12 15:10:46 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: bonds22&lt;/STRONG&gt;&lt;BR /&gt;Here comes the problem: How do I read that value which is stored the flash address 0xC00?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;memcpy&amp;nbsp; &lt;SPAN class="lia-unicode-emoji" title=":winking_face:"&gt;&lt;LI-EMOJI id="lia_winking-face" title=":winking_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or a simple old-fashioned pointer:&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;
 uint32_t val;
 uint32_t address= &lt;I&gt;[color=#00f]type in your address here[/color]&lt;/I&gt;;
 val = (*(uint32_t*)address);
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:03:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-read-data-from-a-specific-Flash-address-in-order-write-it/m-p/563542#M16695</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:03:29Z</dc:date>
    </item>
  </channel>
</rss>

