<?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: overlay RAM in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/overlay-RAM/m-p/1068174#M16072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to read the value from mirrored flash address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2020 06:48:40 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2020-05-26T06:48:40Z</dc:date>
    <item>
      <title>overlay RAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/overlay-RAM/m-p/1068171#M16069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I use the function of MPC5744P :this Flash read operation use mirror small Flash memory logical ddress(0x08F9_8000) with overlay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//57xx_flasah.ld&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;flash_rchw : org = 0x01000000, len = 0x4&lt;BR /&gt; cpu0_reset_vec : org = 0x01000004, len = 0x4&lt;BR /&gt; &lt;BR /&gt; Cal_Data_Flash : org = 0x00F98000, len = 16K /*its mirror Flash address is 0x08F9_0000 to 0x08F9_3FFF*/ &lt;BR /&gt; &lt;BR /&gt; m_text : org = 0x01000400, len = 2047K&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; m_data : org = 0x40000000, len = 368K &lt;BR /&gt; &lt;BR /&gt; Cal_Data_RAM : org = 0x4005C000, len = 16K &lt;BR /&gt; &lt;BR /&gt; local_dmem : org = 0x50800000, len = 64K &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;//57xx_ram.ld&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;SRAM : org = 0x40000000, len = 384K&lt;BR /&gt; &lt;BR /&gt; local_dmem : org = 0x50800000, len = 64K &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define CALIBRATION_SEG __attribute__ ((section(".CalRefPage")))&lt;/P&gt;&lt;P&gt;uint32_t CALIBRATION_SEG CalRefPara[20]={0,1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};&lt;/P&gt;&lt;P&gt;uint8_t CALIBRATION_SEG g_byCalData = 99;&lt;/P&gt;&lt;P&gt;uint8_t CALIBRATION_SEG g_byCalSaveKey = 12;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define Calibration_Flash_Start_Addr 0x08F98000&lt;BR /&gt;#define Calibration_SRAM_Start_Addr 0x4005C000&lt;BR /&gt;#define Calibration_Remap_Size 0x4000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calibration_RAM_CopyDown((uint32_t *)Calibration_Flash_Start_Addr,(uint32_t *)Calibration_SRAM_Start_Addr,Calibration_Remap_Size);&lt;/P&gt;&lt;P&gt;Flash_OverlayRAM_Calibration_Init();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//while(1) code below&lt;/P&gt;&lt;P&gt;Cal_Flash_Data_Read = *((uint32_t *)Calibration_Flash_Start_Addr);/*get the first calibration data stored on the mirror flash*/&lt;/P&gt;&lt;P&gt;Cal_Flash_Data_Read++;/*increase and write to the OverlyRAM*/&lt;BR /&gt; pWokPara = (uint32_t *)Calibration_SRAM_Start_Addr;&lt;BR /&gt; *pWokPara = Cal_Flash_Data_Read;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I run the code,and stop at a time :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RAM memory area:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;address&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0~3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4~7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8~B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C~F&lt;/P&gt;&lt;P&gt;4005c000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0C67057A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00000000&amp;nbsp; &amp;nbsp; &amp;nbsp;00000001&amp;nbsp; &amp;nbsp;00000002&lt;/P&gt;&lt;P&gt;...............&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ............&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.......&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mirror flash memory area:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;address&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0~3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4~7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8~B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C~F&lt;/P&gt;&lt;P&gt;08F98000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0C67057A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00000000&amp;nbsp; &amp;nbsp; &amp;nbsp;00000001&amp;nbsp; &amp;nbsp;00000002&lt;/P&gt;&lt;P&gt;...............&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ............&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.......&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;flash&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;memory area:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;address&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0~3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4~7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8~B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;C~F&lt;/P&gt;&lt;P&gt;00F98000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0C670000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00000000&amp;nbsp; &amp;nbsp; &amp;nbsp;00000001&amp;nbsp; &amp;nbsp;00000002&lt;/P&gt;&lt;P&gt;...............&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ............&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.......&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then how can I read the mirror flash data with gloabal&amp;nbsp;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 14px;"&gt;variables（such as &lt;SPAN style="color: #3d3d3d;"&gt;CalRefPara[0]&lt;/SPAN&gt;）?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 14px;"&gt;or how can I write the data in mirror flash&lt;SPAN&gt;(0x&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;08F98000~&amp;nbsp;0x08F9BFFF&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; (or ram start at 0x&lt;SPAN style="color: #3d3d3d;"&gt;4005c000&lt;/SPAN&gt;) to flash memory(0x&lt;SPAN style="color: #3d3d3d;"&gt;00F98000~&amp;nbsp;0x00F9BFFF&lt;/SPAN&gt;)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff; font-size: 14px;"&gt;code below is reading a global varible:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sJ1939Param.sEMU_MCU_FW3.uOutpMotinvtempact = CalRefPara[0];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2020 02:58:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/overlay-RAM/m-p/1068171#M16069</guid>
      <dc:creator>金翅大鹏鸟</dc:creator>
      <dc:date>2020-05-25T02:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: overlay RAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/overlay-RAM/m-p/1068172#M16070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you got expected result. When overlay is turned on, you can see the effect only in mirrored address space. Flash in normal address space is not affected by overlay. You will always read original data from normal address space. So, the calibration data should be read from mirrored address space. If the overlay is turned off, you will read original flash data, if it is turned on, you will read RAM data. Still from the same address (mirrored flash address). And if you want to update the calibration data in flash, normal flash needs to be reprogrammed by yourself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2020 10:22:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/overlay-RAM/m-p/1068172#M16070</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2020-05-25T10:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: overlay RAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/overlay-RAM/m-p/1068173#M16071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;If I want to get a varible such as &lt;SPAN&gt;CalRefPara[0]&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;(value changed from 12 to 100),How can I get the&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;changed value(100)?&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;sJ1939Param.sEMU_MCU_FW3.uOutpMotinvtempact = CalRefPara[0]; The address of&amp;nbsp;CalRefPara[0] is in&amp;nbsp;original flash. Must I get the changed value at the RAM or mirror flash address?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2020 02:24:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/overlay-RAM/m-p/1068173#M16071</guid>
      <dc:creator>金翅大鹏鸟</dc:creator>
      <dc:date>2020-05-26T02:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: overlay RAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/overlay-RAM/m-p/1068174#M16072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to read the value from mirrored flash address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2020 06:48:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/overlay-RAM/m-p/1068174#M16072</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2020-05-26T06:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: overlay RAM</title>
      <link>https://community.nxp.com/t5/MPC5xxx/overlay-RAM/m-p/1371770#M19618</link>
      <description>&lt;P&gt;Hello Both of you,&lt;/P&gt;&lt;P&gt;I am trying to implement Flash Overlay (remapping to SRAM) from 0x00FF0000 Flash memory region to 0x4001FF00 RAM of MPC5744P.&lt;BR /&gt;It is not working for me, then i have verified Data sheet, there i can see all the Flash regions are mentioned as "No Overlay".&lt;BR /&gt;&lt;BR /&gt;I am referring this Document&amp;nbsp;&lt;STRONG&gt;"MPC5744P Reference Manual, Rev. 6, 09/2015 ".&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Could you explain me the concept behind this ?&lt;/P&gt;&lt;P&gt;i have attached the Register used below&lt;/P&gt;&lt;P&gt;PFLASH_PFCRCR = 0x00000011;&lt;BR /&gt;PFLASH_PFCRDE = 0x80000000;&lt;BR /&gt;PFLASH_PFCRD0_Word0 = 0x00FF0000;&lt;BR /&gt;PFLASH_PFCRD0_Word1 = 0x4001FF00;&lt;BR /&gt;PFLASH_PFCRD0_Word2 = 0xFFFF0005;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 08:12:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/overlay-RAM/m-p/1371770#M19618</guid>
      <dc:creator>SivaValeo</dc:creator>
      <dc:date>2021-11-16T08:12:32Z</dc:date>
    </item>
  </channel>
</rss>

