<?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>Kinetis MicrocontrollersのトピックReading flash - why not by normal memory access?</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reading-flash-why-not-by-normal-memory-access/m-p/386712#M20825</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While porting an application from TI´s MSP430 to the Kinetis KL15, I came to the point of porting the flash access routines. I am placing my configuration data in flash, this is working fine on the MSP430.&lt;/P&gt;&lt;P&gt;I am used to (read) access the flash memory like I would access data in RAM. As the Kinetis has a von Neumann Architecture (i.e. single memory area for both program and data memory), I had expected the same to be true for the Kinetis. However, what PE generates does not quite look like a simple memory access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was really convenient to use flash memory like RAM when reading, I am not exactly eager to copy everything into RAM before being able to use it. It means extra code and extra RAM. Is there a chance to access some user flash area with a simple read access? If yes, how? If not, what is the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Oct 2014 11:46:18 GMT</pubDate>
    <dc:creator>l0wside</dc:creator>
    <dc:date>2014-10-13T11:46:18Z</dc:date>
    <item>
      <title>Reading flash - why not by normal memory access?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reading-flash-why-not-by-normal-memory-access/m-p/386712#M20825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While porting an application from TI´s MSP430 to the Kinetis KL15, I came to the point of porting the flash access routines. I am placing my configuration data in flash, this is working fine on the MSP430.&lt;/P&gt;&lt;P&gt;I am used to (read) access the flash memory like I would access data in RAM. As the Kinetis has a von Neumann Architecture (i.e. single memory area for both program and data memory), I had expected the same to be true for the Kinetis. However, what PE generates does not quite look like a simple memory access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was really convenient to use flash memory like RAM when reading, I am not exactly eager to copy everything into RAM before being able to use it. It means extra code and extra RAM. Is there a chance to access some user flash area with a simple read access? If yes, how? If not, what is the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 11:46:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reading-flash-why-not-by-normal-memory-access/m-p/386712#M20825</guid>
      <dc:creator>l0wside</dc:creator>
      <dc:date>2014-10-13T11:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reading flash - why not by normal memory access?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reading-flash-why-not-by-normal-memory-access/m-p/386713#M20826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can read data from the program flash as any memory-mapped address so there is no need to use special routines.&lt;/P&gt;&lt;P&gt;You only need Flash functions when deleting or programming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the code that you have is using flash routines for reading it is either the wrong code or something is incorrectly configured.&lt;/P&gt;&lt;P&gt;If your configuration data is in declared as a const array or struct you can simpy access it as any variable. Otherwise any pointer access to the Flash location can be used (eg. ucValue = *(unsigned char *)*0x2000;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Oct 2014 13:18:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reading-flash-why-not-by-normal-memory-access/m-p/386713#M20826</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-10-13T13:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Reading flash - why not by normal memory access?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reading-flash-why-not-by-normal-memory-access/m-p/386714#M20827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;thank you. I was on the wrong track after looking into the help of PE, which has the function&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A name="GetBlockFlash"&gt;&lt;STRONG&gt;GetBlockFlash&lt;/STRONG&gt;&lt;/A&gt; - Reads data from FLASH. &lt;BR /&gt;&lt;EM&gt;ANSIC prototype:&lt;/EM&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt; byte GetBlockFlash(&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;EM&gt;ComponentName_&lt;/EM&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;TAddress Source, &lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;EM&gt;ComponentName_&lt;/EM&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;TDataAddress Dest, word Count)&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;Source:&lt;A href="http://127.0.0.1:54828/help/ntopic/com.freescale.doc.processorexpert.components/Beans/IntFLASH/IntFLASHUser%20Types.html#TAddress"&gt;&lt;EM&gt;ComponentName_&lt;/EM&gt;TAddress&lt;/A&gt;&lt;/EM&gt; - Destination address in FLASH. &lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Dest:&lt;A href="http://127.0.0.1:54828/help/ntopic/com.freescale.doc.processorexpert.components/Beans/IntFLASH/IntFLASHUser%20Types.html#TDataAddress"&gt;&lt;EM&gt;ComponentName_&lt;/EM&gt;TDataAddress&lt;/A&gt;&lt;/EM&gt; - Source address of the data. &lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Count:word&lt;/EM&gt; - Count of the data fields (in the smallest addressable units). &lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Return value:byte&lt;/EM&gt; - Error code, possible codes: &lt;UL&gt;&lt;LI&gt;ERR_OK - OK &lt;/LI&gt;&lt;LI&gt;ERR_NOTAVAIL - Desired program/erase operation is not available &lt;/LI&gt;&lt;LI&gt;ERR_RANGE - The address is out of range &lt;/LI&gt;&lt;LI&gt;ERR_BUSY - Device is busy &lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I had supposed there is a reason for this function - but it does not seem so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2014 15:26:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reading-flash-why-not-by-normal-memory-access/m-p/386714#M20827</guid>
      <dc:creator>l0wside</dc:creator>
      <dc:date>2014-10-14T15:26:39Z</dc:date>
    </item>
  </channel>
</rss>

