<?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: EEPROM functionality on S32K1xx in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/EEPROM-functionality-on-S32K1xx/m-p/987647#M3877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for quick answer&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/mariuslucianandrei"&gt;mariuslucianandrei&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the initialization&amp;nbsp;code of the EEPROM driver is called from the separate matlab function block: is it a good idea to insert this block inside the 'Initialize' simulink block ? Or is it better to call it only once, at the start of the model using (for example) function call subsytem or stateflow ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what about the&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;DataMemWrite and DataMemRead to access FlexRAM ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Mar 2020 09:45:57 GMT</pubDate>
    <dc:creator>Maciek</dc:creator>
    <dc:date>2020-03-05T09:45:57Z</dc:date>
    <item>
      <title>EEPROM functionality on S32K1xx</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/EEPROM-functionality-on-S32K1xx/m-p/987644#M3874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;we need to store some configuration parameters in non-volatile memory of S32K116. At the moment we test on S32K144 dev-kit.&lt;BR /&gt;Our application is very cost sensitive and we want to avoid installing additional EEPROM on the board.&lt;BR /&gt;The S32K has 2-4 kB of EEPROM implemented as a combination of FlexRAM and FlexNVM that can be used for that purpose.&lt;BR /&gt;As I see there are no ready-to-use simulink blocks for this. Am I right ?&lt;/P&gt;&lt;P&gt;Can I at least use DataMemWrite and DataMemRead to access FlexRAM ? This way the only thing that should be implemented by hand is the FlexNVM/FlexRAM initial configuration...&lt;BR /&gt;What is Your recommended way of adding such additional custom initialization ?&lt;/P&gt;&lt;P&gt;What are my options ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for help&lt;BR /&gt;Maciek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2020 17:52:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/EEPROM-functionality-on-S32K1xx/m-p/987644#M3874</guid>
      <dc:creator>Maciek</dc:creator>
      <dc:date>2020-03-04T17:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: EEPROM functionality on S32K1xx</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/EEPROM-functionality-on-S32K1xx/m-p/987645#M3875</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;I also have the same concern. Please provide your suggestion.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 05:34:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/EEPROM-functionality-on-S32K1xx/m-p/987645#M3875</guid>
      <dc:creator>sagar_salunkhe</dc:creator>
      <dc:date>2020-03-05T05:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: EEPROM functionality on S32K1xx</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/EEPROM-functionality-on-S32K1xx/m-p/987646#M3876</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/Maciek"&gt;Maciek&lt;/A&gt;&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/sagar.salunkhe@faurecia.com"&gt;sagar.salunkhe@faurecia.com&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, we do not have blocks that covers&amp;nbsp;this functionality, so it can be achieved by using custom code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, there are multiple ways to do that:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Using C-Code function&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This method assumes to insert an S-Function Builder block, that will call the code you need via a wrapper. You will also need to modify the&amp;nbsp;&amp;nbsp;mbd_s32k_user_copy_required_files.m script that comes with the toolbox and copies the driver files for the flash. You can have a look on the following links for an example.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/thread/450048?commentID=900776#comment-900776" title="https://community.nxp.com/thread/450048?commentID=900776#comment-900776"&gt;https://community.nxp.com/thread/450048?commentID=900776#comment-900776&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/thread/452468?commentID=910444#comment-910444" title="https://community.nxp.com/thread/452468?commentID=910444#comment-910444"&gt;https://community.nxp.com/thread/452468?commentID=910444#comment-910444&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Using Custom Code blocks from Simulink Coder&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This method is easier, allowing you to directly type the C code inside one of those blocks. The problem is that this does no allows you to provide data as an usually output port of tha block,&amp;nbsp; so you will need to use a Data Store Memory block as volatile and to manually assign the value read from the EEPROM to that variable. The following thread offers a short description. You will still need to modify the&amp;nbsp;&lt;SPAN&gt;mbd_s32k_user_copy_required_files.m&amp;nbsp; script as for the first method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/message/1040943?commentID=1040943#comment-1040943" title="https://community.nxp.com/message/1040943?commentID=1040943#comment-1040943"&gt;https://community.nxp.com/message/1040943?commentID=1040943#comment-1040943&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. Using MATLAB Function Block&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method lets the user to call the custom code using the Matlab Coder, from inside a Matlab Function block. And you can easily get the data read from EEPROM and provides it to an output port, just like a regular Simulink Block. The following link provides the Documentation from Mathworks.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.mathworks.com/help/simulink/ug/incorporate-c-code-using-a-matlab-function-block.html" title="https://www.mathworks.com/help/simulink/ug/incorporate-c-code-using-a-matlab-function-block.html"&gt;Integrate C Code Using the MATLAB Function Block- MATLAB &amp;amp; Simulink&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the easiest method to use in this scenario, calling SDK driver functions is the third one. I will provide a tutorial on how to integrate C Code Using the Matlab Function Block soon. I will notify you when the tutorial will be published!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Marius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 08:13:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/EEPROM-functionality-on-S32K1xx/m-p/987646#M3876</guid>
      <dc:creator>mariuslucianand</dc:creator>
      <dc:date>2020-03-05T08:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: EEPROM functionality on S32K1xx</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/EEPROM-functionality-on-S32K1xx/m-p/987647#M3877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for quick answer&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/mariuslucianandrei"&gt;mariuslucianandrei&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the initialization&amp;nbsp;code of the EEPROM driver is called from the separate matlab function block: is it a good idea to insert this block inside the 'Initialize' simulink block ? Or is it better to call it only once, at the start of the model using (for example) function call subsytem or stateflow ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what about the&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;DataMemWrite and DataMemRead to access FlexRAM ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2020 09:45:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/EEPROM-functionality-on-S32K1xx/m-p/987647#M3877</guid>
      <dc:creator>Maciek</dc:creator>
      <dc:date>2020-03-05T09:45:57Z</dc:date>
    </item>
  </channel>
</rss>

