<?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 Why does the IntEEPROM bean use twice the amount of memory? in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162676#M198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use the IntEEPROM bean, and its&amp;nbsp;SetByte and SetLong methods.&lt;/P&gt;&lt;P&gt;SetByte writes&amp;nbsp;to word aligned adresses.&lt;/P&gt;&lt;P&gt;SetLong writes&amp;nbsp;on&amp;nbsp;8 byte boundaries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This means I need to allocate (with the "Used size" property)&lt;/P&gt;&lt;P&gt;twice the amount of memory than I intend to use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming my description above is correct:&lt;/P&gt;&lt;P&gt;* Why is the bean implemented like this?&lt;/P&gt;&lt;P&gt;* Where is this documented?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anders J&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 May 2012 18:10:13 GMT</pubDate>
    <dc:creator>AndersJ</dc:creator>
    <dc:date>2012-05-12T18:10:13Z</dc:date>
    <item>
      <title>Why does the IntEEPROM bean use twice the amount of memory?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162676#M198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use the IntEEPROM bean, and its&amp;nbsp;SetByte and SetLong methods.&lt;/P&gt;&lt;P&gt;SetByte writes&amp;nbsp;to word aligned adresses.&lt;/P&gt;&lt;P&gt;SetLong writes&amp;nbsp;on&amp;nbsp;8 byte boundaries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This means I need to allocate (with the "Used size" property)&lt;/P&gt;&lt;P&gt;twice the amount of memory than I intend to use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming my description above is correct:&lt;/P&gt;&lt;P&gt;* Why is the bean implemented like this?&lt;/P&gt;&lt;P&gt;* Where is this documented?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anders J&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 May 2012 18:10:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162676#M198</guid>
      <dc:creator>AndersJ</dc:creator>
      <dc:date>2012-05-12T18:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the IntEEPROM bean use twice the amount of memory?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162677#M199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you please specify what MCU do you use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Vojtech Filip&lt;BR /&gt;Processor Expert Support Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 15:34:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162677#M199</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2012-05-14T15:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the IntEEPROM bean use twice the amount of memory?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162678#M200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for being unclear.&lt;/P&gt;&lt;P&gt;It is the MC9S12XEP100, CW 4.7 and&amp;nbsp;PE 2.99.&lt;/P&gt;&lt;P&gt;Anders J&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 16:26:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162678#M200</guid>
      <dc:creator>AndersJ</dc:creator>
      <dc:date>2012-05-14T16:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the IntEEPROM bean use twice the amount of memory?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162679#M201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It &amp;nbsp;think it is rather misunderstanding. You don’t need to allocate twice amount of the memory in case of using SetByte, SetLong methods.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SetByte allows write each byte&lt;/P&gt;&lt;P&gt;SetLong allows write on four byte aligned addresses&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For more details please see the "Address align" section in the help of the component (right click on the component -&amp;gt; Help command)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case you want to avoid the align limitation, you can use “virtual page” feature which uses an array in RAM that could by handled and write to the flash by corresponding page methods. Please see the "Virtual page" section in the help for more details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Vojtech Filip&lt;BR /&gt;Processor Expert Support Team&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 17:25:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162679#M201</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2012-05-15T17:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the IntEEPROM bean use twice the amount of memory?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162680#M202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vojtech, thanks for replying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not believe the help explains this.&lt;/P&gt;&lt;P&gt;Reading hte PE-generated code for SetByte&amp;nbsp;I see&amp;nbsp;word alignment checks.&lt;/P&gt;&lt;P&gt;suggesting that the code does as I claim it does, in other words,&lt;/P&gt;&lt;P&gt;it writes bytes to word aligned adresses.&lt;/P&gt;&lt;P&gt;My original questions therefore remain unanswered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could it be my code together&amp;nbsp;with the PrExp_EEPROM_TAdress type definition?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see my attached code below.&lt;/P&gt;&lt;P&gt;The code seems to loose its formatting when include here so&lt;/P&gt;&lt;P&gt;I am attaching it as well, hoping to preserve the indentaions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When disassembled it seems my ID parameter is doubled before adding&lt;/P&gt;&lt;P&gt;to PrExp_EEPROM_AREA_START.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Anders J&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/*** ===================================================================** Store a byte in volatile storage defined by passed Id** If byte is already stored do not overwrite**     Parameters  : Non volatile storage parameter Id: nvsidXyz**                   Byte to store**     Returns     : nothing** ===================================================================*/void App_Driver_NonVolatileStorage_Put_uChar(unsigned char Id, unsigned char B){  PrExp_EEPROM_TAddress Location_Main, Location_Mirr;      &amp;lt;&amp;lt;&amp;lt;------------- POSSIBLE PROBLEM typdef ???  unsigned char WrResult;    if (Id &amp;lt;= nvsidEndOfStorage_uChar) // Cannot test on start, compiler complains COND always TRUE     {            if (App_Driver_NonVolatileStorage_Get_uChar(Id) != B)        {                        Location_Main = PrExp_EEPROM_AREA_START + Id;  / &amp;lt;&amp;lt;&amp;lt;------------- POSSIBLE PROBLEM CODE ???          Location_Mirr = Location_Main + nvsMirrorLocation;          WrResult = PrExp_EEPROM_SetByte(Location_Main, B); // Main storage          if (WrResult != ERR_OK)            {              App_Driver_Uart_TransmitStr("NVRAM write error-Main 08", TRUE);            }          WrResult = PrExp_EEPROM_SetByte(Location_Mirr, (B ^ 0xFF)); // Mirrored storage          if (WrResult != ERR_OK)            {              App_Driver_Uart_TransmitStr("NVRAM write error-Mirror 08", TRUE);            }        }    }}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:08:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162680#M202</guid>
      <dc:creator>AndersJ</dc:creator>
      <dc:date>2020-10-29T09:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the IntEEPROM bean use twice the amount of memory?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162681#M203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maybe&amp;nbsp;type cast will help:&lt;/P&gt;&lt;P&gt;Location_Main = (PrExp_EEPROM_TAddress) ((unsigned char*) PrExp_EEPROM_AREA_START + Id);&lt;/P&gt;&lt;P&gt;~Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 12:08:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162681#M203</guid>
      <dc:creator>MarkP_</dc:creator>
      <dc:date>2012-05-17T12:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the IntEEPROM bean use twice the amount of memory?</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162682#M204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as wrote Mark, this is not PEx issue, this is rather applicaiton issue. However this is not first time when we received such issue so we have added constants representing only numbers (e.g.IEE2_AREA_START_INT) to avoid confusion with pointer arythmetics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;example of HEADER of component: #define IEE2_AREA_START_INT 0x00100000UL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;user MAIN: IEE1_SetByte((IEE1_TAddress)(IEE2_AREA_START_INT + 1),0x44);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CW V5.1&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/lgfiles/devsuites/HC12/CW_HC12_v5.1_SPECIAL.exe?fpsp=1&amp;amp;WT_TYPE=IDE%20-%20Debug,%20Compile%20and%20Build%20Tools&amp;amp;WT_VENDOR=FREESCALE&amp;amp;WT_FILE_FORMAT=exe&amp;amp;WT_ASSET=Downloads&amp;amp;sr=1" rel="nofollow" target="_blank"&gt;http://cache.freescale.com/lgfiles/devsuites/HC12/CW_HC12_v5.1_SPECIAL.exe?fpsp=1&amp;amp;WT_TYPE=IDE%20-%20Debug,%20Compile%20and%20Build%20Tools&amp;amp;WT_VENDOR=FREESCALE&amp;amp;WT_FILE_FORMAT=exe&amp;amp;WT_ASSET=Downloads&amp;amp;sr=1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;latest PEx for CW HCS12(X) for CW V5.1: &lt;A href="http://cache.freescale.com/lgfiles/updates/CWHC12/CW12_V5_1_PE_V3_04_SP.exe" rel="nofollow" target="_blank"&gt;http://cache.freescale.com/lgfiles/updates/CWHC12/CW12_V5_1_PE_V3_04_SP.exe&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Vojtech Filip&lt;BR /&gt;Processor Expert Support Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2012 15:50:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Why-does-the-IntEEPROM-bean-use-twice-the-amount-of-memory/m-p/162682#M204</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2012-05-18T15:50:38Z</dc:date>
    </item>
  </channel>
</rss>

