<?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>Model-Based Design Toolbox (MBDT)のトピックRe: MBD ToolBox : DataMemRead / DataMemWrite on flash</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MBD-ToolBox-DataMemRead-DataMemWrite-on-flash/m-p/754507#M1853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you for your quick answer.&lt;/P&gt;&lt;P&gt;I would bet on the same answer. I will surely add an EEPROM for my device. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But just to understand, I found this Figure on the "MPC5744PRM.pdf"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/47691iC23A85DB34BDC0E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With the MBD ToolBox blocks DataMem, we are using the yellow "link" ?&lt;/P&gt;&lt;P&gt;So to read/write in the Flash we would need an other block/function to be able to use the "Flash Memory Controller" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you,&lt;/P&gt;&lt;P&gt;Adrien.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Apr 2018 12:25:41 GMT</pubDate>
    <dc:creator>adrienpol</dc:creator>
    <dc:date>2018-04-23T12:25:41Z</dc:date>
    <item>
      <title>MBD ToolBox : DataMemRead / DataMemWrite on flash</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MBD-ToolBox-DataMemRead-DataMemWrite-on-flash/m-p/754505#M1851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to store some data on the flash of my MPC5744p, and to be able to keep them after a reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I follow advises from this post :&amp;nbsp;&lt;A href="https://community.nxp.com/thread/455864"&gt;How to manage the memory using the simulink?&lt;/A&gt;&amp;nbsp; (method 2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I modified "MPC5744P_FLASH.ld" :&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;MEMORY { &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; word&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;&amp;nbsp; :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00FA0000, len = 0x0000001F&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int_flash&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x00FA0020, len = 0x0020DFE0&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;m_dflash&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x011AE000, len = 0x00050000 &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vector_table&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x011FE000, len = 0x00001000&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exception_handlers&amp;nbsp; :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x011FF000, len = 0x00001000&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int_sram&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x40000000, len = 0x0005F800&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stack_ram&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x4005F800, len = 0x00000800&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; local_sram&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x50800000, len = 0x00010000&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;SECTIONS&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.dflash : { KEEP (*(.dflash)) } &amp;gt; m_dflash&amp;nbsp; /* place .dflash section into dflsah memory*/&lt;BR /&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Point on it in the Matlab configuration, and checked modification in the generated ".map"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Simulink I have a DataMemRead and a DataMemWrite block with this configuration :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/35426i5D527DC6021E80AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To test, I configure the Write box to write the data from a CAN Signal, on trigger. And I read it on a second CAN signal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I generate the ".elf" with Simulink, and use S32 Design Studio to flash on the board.&lt;/P&gt;&lt;P&gt;It works until this point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I can't view my data on the "Memory" View of S32 :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/35507i4C62995CE09EC534/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And after a reset my read data is always "0xFF".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If someone has a clue... :smileywink:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;BR /&gt;Adrien.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 17:05:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MBD-ToolBox-DataMemRead-DataMemWrite-on-flash/m-p/754505#M1851</guid>
      <dc:creator>adrienpol</dc:creator>
      <dc:date>2018-04-20T17:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: MBD ToolBox : DataMemRead / DataMemWrite on flash</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MBD-ToolBox-DataMemRead-DataMemWrite-on-flash/m-p/754506#M1852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrien,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My 2 cents on this - i think it can only works with RAM addresses since for writing in flash we need special instructions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/constantinrazvan.chivu"&gt;constantinrazvan.chivu&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Can you please confirm?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Apr 2018 14:54:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MBD-ToolBox-DataMemRead-DataMemWrite-on-flash/m-p/754506#M1852</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2018-04-22T14:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: MBD ToolBox : DataMemRead / DataMemWrite on flash</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MBD-ToolBox-DataMemRead-DataMemWrite-on-flash/m-p/754507#M1853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you for your quick answer.&lt;/P&gt;&lt;P&gt;I would bet on the same answer. I will surely add an EEPROM for my device. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But just to understand, I found this Figure on the "MPC5744PRM.pdf"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/47691iC23A85DB34BDC0E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With the MBD ToolBox blocks DataMem, we are using the yellow "link" ?&lt;/P&gt;&lt;P&gt;So to read/write in the Flash we would need an other block/function to be able to use the "Flash Memory Controller" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you,&lt;/P&gt;&lt;P&gt;Adrien.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 12:25:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MBD-ToolBox-DataMemRead-DataMemWrite-on-flash/m-p/754507#M1853</guid>
      <dc:creator>adrienpol</dc:creator>
      <dc:date>2018-04-23T12:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: MBD ToolBox : DataMemRead / DataMemWrite on flash</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MBD-ToolBox-DataMemRead-DataMemWrite-on-flash/m-p/754508#M1854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/adrienpol"&gt;adrienpol&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You and &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dumitru-daniel.popa"&gt;dumitru-daniel.popa&lt;/A&gt;&amp;nbsp;are right - you will be needing another block to be able to use the flash memory controller to program(0)/erase(1) bits into flash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And regarding the DataMem block, it does use the "yellow link" as described by you (the system RAM controller).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately we do not have such a block for now, but you can import the example from the SDK for MPC5744x that comes with the S32 Design Studio - it shows how to use FLASH_DRV* functions to program and erase flash. You can find more documentation in &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN style="color: #0000ff;"&gt;[Install Folder]\S32DS_Power_v2017.R1\S32DS\S32_SDK_MPC574xx_EAR_0.8.2\doc\Start_here.html&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Click on&amp;nbsp;Modules -&amp;gt; Flash Memory and see all the functions the SDK provides)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Razvan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 13:23:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/MBD-ToolBox-DataMemRead-DataMemWrite-on-flash/m-p/754508#M1854</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2018-04-23T13:23:14Z</dc:date>
    </item>
  </channel>
</rss>

