<?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>S32KのトピックRe: [S32K144 EVB] Call a function on RAM from a function at Flash</title>
    <link>https://community.nxp.com/t5/S32K/S32K144-EVB-Call-a-function-on-RAM-from-a-function-at-Flash/m-p/1407574#M13857</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196375"&gt;@AndersonStarling&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Can you please specify what driver do you use?&lt;/P&gt;
&lt;P&gt;Is the Fls_Erase() function in SRAM a blocking function that waits until the flash operation is complete?&lt;/P&gt;
&lt;P&gt;If so, it does not matter where the function that calls Fls_Erase() is located.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Feb 2022 13:00:57 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2022-02-01T13:00:57Z</dc:date>
    <item>
      <title>[S32K144 EVB] Call a function on RAM from a function at Flash</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-EVB-Call-a-function-on-RAM-from-a-function-at-Flash/m-p/1407161#M13851</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I set Fls_Erase function at RAM(address: 0x1fff8188), and I use Fls_Init_Node_Data at Flash(address: 0x674) call this function.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndersonStarling_1-1643639065157.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/169231iFB56D8EA487111A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AndersonStarling_1-1643639065157.png" alt="AndersonStarling_1-1643639065157.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- However, once I call&amp;nbsp;Fls_Erase from&amp;nbsp;Fls_Init_Node_Data , the system crash and a WDOG fault exception executes.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndersonStarling_7-1643639962621.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/169240iD136EDC2312EC620/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AndersonStarling_7-1643639962621.png" alt="AndersonStarling_7-1643639962621.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- I try to move&amp;nbsp;Fls_Init_Node_Data to RAM too, my system work normally. So, I think that&amp;nbsp;Fls_Init_Node_Data call&amp;nbsp;Fls_Erase at a far distance address. I also check assembly code: Fls_Erase is called by BL command(range +- 32MB).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndersonStarling_5-1643639552419.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/169238iF1FAF6A516B2881B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AndersonStarling_5-1643639552419.png" alt="AndersonStarling_5-1643639552419.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndersonStarling_3-1643639421446.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/169234iE5C00D599DDD2AD0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AndersonStarling_3-1643639421446.png" alt="AndersonStarling_3-1643639421446.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;- So, I would like to know how to call a RAM function from Flash. To do this, do we use a compiler option or another solution?&lt;/P&gt;&lt;P&gt;I hope I give your answer soon, thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 14:46:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-EVB-Call-a-function-on-RAM-from-a-function-at-Flash/m-p/1407161#M13851</guid>
      <dc:creator>AndersonStarling</dc:creator>
      <dc:date>2022-01-31T14:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K144 EVB] Call a function on RAM from a function at Flash</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-EVB-Call-a-function-on-RAM-from-a-function-at-Flash/m-p/1407574#M13857</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196375"&gt;@AndersonStarling&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Can you please specify what driver do you use?&lt;/P&gt;
&lt;P&gt;Is the Fls_Erase() function in SRAM a blocking function that waits until the flash operation is complete?&lt;/P&gt;
&lt;P&gt;If so, it does not matter where the function that calls Fls_Erase() is located.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2022 13:00:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-EVB-Call-a-function-on-RAM-from-a-function-at-Flash/m-p/1407574#M13857</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-02-01T13:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K144 EVB] Call a function on RAM from a function at Flash</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-EVB-Call-a-function-on-RAM-from-a-function-at-Flash/m-p/1409762#M13915</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160001"&gt;@danielmartynek&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes,&amp;nbsp;&lt;SPAN&gt;Fls_Erase() function is a blocking function that waits until the flash operation is complete&amp;nbsp;in SRAM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I located&amp;nbsp;Fls_Erase to ".code_ram" section instead of ".code" section, everything worked normally. &lt;STRONG&gt;Setting the function to ".code" section is the cause that led to my fault.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Map file in case function to ".code_ram" section:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndersonStarling_0-1644249812725.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/169758i10F2E1E927D297C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AndersonStarling_0-1644249812725.png" alt="AndersonStarling_0-1644249812725.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Map file in case function to ".code" section(fault exception occurs)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndersonStarling_1-1644249847749.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/169759iAD7C1AC1DA610891/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AndersonStarling_1-1644249847749.png" alt="AndersonStarling_1-1644249847749.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My linker knowledge is small. So could you explain for me a little bit about ".code" and ".code_ram" sections in the linker script?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I attached my linker script to the topic that you could review.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 16:06:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-EVB-Call-a-function-on-RAM-from-a-function-at-Flash/m-p/1409762#M13915</guid>
      <dc:creator>AndersonStarling</dc:creator>
      <dc:date>2022-02-07T16:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: [S32K144 EVB] Call a function on RAM from a function at Flash</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-EVB-Call-a-function-on-RAM-from-a-function-at-Flash/m-p/1410234#M13925</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196375"&gt;@AndersonStarling&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I'm not sure how did you place the functions to .code section.&lt;/P&gt;
&lt;P&gt;But it must be in .code_ram section.&lt;/P&gt;
&lt;P&gt;Becasue the startup code (startup.c) copies the functions from ROM (flash) to SRAM after every reset, so that it can be called in the application from SRAM.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1644318651739.png" style="width: 410px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/169852iAC813FC3733B444E/image-dimensions/410x135?v=v2" width="410" height="135" role="button" title="danielmartynek_0-1644318651739.png" alt="danielmartynek_0-1644318651739.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 11:12:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-EVB-Call-a-function-on-RAM-from-a-function-at-Flash/m-p/1410234#M13925</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-02-08T11:12:48Z</dc:date>
    </item>
  </channel>
</rss>

