<?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: How to write data into data flash (S32K344) in S32K</title>
    <link>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1608938#M21095</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/208972"&gt;@Foxconn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You mentioned that you have S32K344 but the screenshot shows S32K324. Could you confirm what do you have exactly? I know that it's the same device and that we can easily switch between lockstep and decoupled mode but the project should be created for correct derivative in any case. Maybe this is the reason.&lt;/P&gt;
&lt;P&gt;I have some project here for S32K344 where boot header is forced to data flash:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1677823885589.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213093i72C501A336ACB691/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1677823885589.png" alt="lukaszadrapa_0-1677823885589.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_1-1677823892377.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213094i406BB13798BC5E6E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_1-1677823892377.png" alt="lukaszadrapa_1-1677823892377.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I use this default configuration:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_2-1677823924110.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213095i16753C7BADAA85A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_2-1677823924110.png" alt="lukaszadrapa_2-1677823924110.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;and when loading this project to S32K344, it is successfully programmed:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_3-1677823951730.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213096i249CFBA1590EA6AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_3-1677823951730.png" alt="lukaszadrapa_3-1677823951730.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Fri, 03 Mar 2023 06:14:32 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2023-03-03T06:14:32Z</dc:date>
    <item>
      <title>How to write data into data flash (S32K344)</title>
      <link>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1608789#M21087</link>
      <description>&lt;P&gt;Hello, I use the chip of S32K344 and want to write data into data flash (0x10000000).&lt;/P&gt;&lt;P&gt;The dFlashVersion can't write to the data flash!&amp;nbsp; My method below:&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;int_dflash : ORIGIN = 0x10000000, LENGTH = 0x00001000&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;SECTION&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;.dflash:&lt;BR /&gt;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp;. = ALIGN(4);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;KEEP (*(.dflash))&lt;BR /&gt;&amp;nbsp; &amp;nbsp;. = ALIGN(4);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;} &amp;gt; int_dflash&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;__attribute__((section(".dflash"))) const uint8_t dFlashVersion[] =&lt;BR /&gt;{0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x11, 0x22};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and reference the method :&amp;nbsp;&lt;A href="https://community.nxp.com/t5/MPC5xxx/How-to-set-data-flash-memory-in-link-file/td-p/780056" target="_blank"&gt;How to set data flash memory in link file - NXP Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my debug configuration, I click the Browse button and didn't find any *.pcp files.&lt;/P&gt;&lt;P&gt;Is this why writing data fails?&amp;nbsp; Or how to solve it?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Foxconn_0-1677805318872.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213068i58FF096CEB39998A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Foxconn_0-1677805318872.png" alt="Foxconn_0-1677805318872.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Foxconn_1-1677805381362.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213069i048C1606C001AB2F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Foxconn_1-1677805381362.png" alt="Foxconn_1-1677805381362.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Best Regards.&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;</description>
      <pubDate>Fri, 03 Mar 2023 01:12:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1608789#M21087</guid>
      <dc:creator>Foxconn</dc:creator>
      <dc:date>2023-03-03T01:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to write data into data flash (S32K344)</title>
      <link>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1608938#M21095</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/208972"&gt;@Foxconn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You mentioned that you have S32K344 but the screenshot shows S32K324. Could you confirm what do you have exactly? I know that it's the same device and that we can easily switch between lockstep and decoupled mode but the project should be created for correct derivative in any case. Maybe this is the reason.&lt;/P&gt;
&lt;P&gt;I have some project here for S32K344 where boot header is forced to data flash:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1677823885589.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213093i72C501A336ACB691/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1677823885589.png" alt="lukaszadrapa_0-1677823885589.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_1-1677823892377.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213094i406BB13798BC5E6E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_1-1677823892377.png" alt="lukaszadrapa_1-1677823892377.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I use this default configuration:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_2-1677823924110.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213095i16753C7BADAA85A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_2-1677823924110.png" alt="lukaszadrapa_2-1677823924110.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;and when loading this project to S32K344, it is successfully programmed:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_3-1677823951730.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213096i249CFBA1590EA6AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_3-1677823951730.png" alt="lukaszadrapa_3-1677823951730.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 06:14:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1608938#M21095</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2023-03-03T06:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to write data into data flash (S32K344)</title>
      <link>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1608990#M21097</link>
      <description>&lt;P&gt;Thank you for your support!&lt;/P&gt;&lt;P&gt;I found out that I used another ld file and the section needed to add the address&lt;/P&gt;&lt;P&gt;This will be the solution! (This version writes to dataflash 0x10000000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define FW_VERSION_LENGTH&amp;nbsp; &amp;nbsp; 16&lt;/P&gt;&lt;P&gt;__attribute__((section(".dflash"))) const uint8_t usFwVersion[FW_VERSION_LENGTH] =&lt;BR /&gt;{0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I found that the address (0x10000010) is not my data (0x809E4070, 0x01000000), and check the map file can not search the reason.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you analyze it for me?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Foxconn_3-1677828203462.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213103iFD66FB3B9A2958B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Foxconn_3-1677828203462.png" alt="Foxconn_3-1677828203462.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Foxconn_4-1677828376487.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213104iB529B3F00EA5E472/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Foxconn_4-1677828376487.png" alt="Foxconn_4-1677828376487.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 07:33:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1608990#M21097</guid>
      <dc:creator>Foxconn</dc:creator>
      <dc:date>2023-03-03T07:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to write data into data flash (S32K344)</title>
      <link>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1609355#M21120</link>
      <description>&lt;P&gt;I don't know where it comes from, I would need to see whole map file and linker file, at least.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 16:51:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1609355#M21120</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2023-03-03T16:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to write data into data flash (S32K344)</title>
      <link>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1609645#M21134</link>
      <description>&lt;P&gt;Dear Lukas,&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;I upload an attachment,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;I keep track of other information in the data flash. The compiler seems to put the extra data there (behind my data)?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;P.S.&amp;nbsp; if my data configuration flash 0x10000050 and extra data will configuration 0x10000060 &lt;/FONT&gt;&lt;FONT&gt;(behind my data) by compiler&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Foxconn_1-1678070691782.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213213i913BE140FC56C813/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Foxconn_1-1678070691782.png" alt="Foxconn_1-1678070691782.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.dflash 0x10000000 0x10&lt;BR /&gt;*(.dflash)&lt;BR /&gt;.dflash 0x10000000 0x10 ./src/AppSrc/MainApp.o&lt;BR /&gt;0x10000000 usFwVersion&lt;/P&gt;&lt;P&gt;. ARM.extab 0x10000010 0x0&lt;BR /&gt;. ARM.extab 0x10000010 0x0 &lt;FONT color="#3366FF"&gt;c:/nxp/s32ds.3.4/s32ds/build_tools/gcc_v10.2/gcc-10.2-arm32-eabi/bin/.. /lib/gcc/arm-none-eabi/10.2.0/thumb/v7e-m+fp/hard\libgcc.a(_udivmoddi4.o)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;. ARM.exidx 0x10000010 0x8&lt;BR /&gt;. ARM.exidx 0x10000010 0x8 &lt;FONT color="#3366FF"&gt;c:/nxp/s32ds.3.4/s32ds/build_tools/gcc_v10.2/gcc-10.2-arm32-eabi/bin/.. /lib/gcc/arm-none-eabi/10.2.0/thumb/v7e-m+fp/hard\libgcc.a(_udivmoddi4.o)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;.rel.dyn 0x10000018 0x0&lt;BR /&gt;.rel.iplt 0x10000018 0x0 &lt;FONT color="#3366FF"&gt;./Project_Settings/Startup_Code/Vector_Table.o&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;THX&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Best Regards.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 01:48:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1609645#M21134</guid>
      <dc:creator>Foxconn</dc:creator>
      <dc:date>2023-03-08T01:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to write data into data flash (S32K344)</title>
      <link>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1610112#M21157</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/208972"&gt;@Foxconn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found out that it's internally used by gcc for unwinding for exception handling.&lt;/P&gt;
&lt;P&gt;If new application project is created in S32DS without RTD, it's explicitly defined in linker file like this and it's placed to program flash:&lt;/P&gt;
&lt;P&gt;.ARM.extab :&lt;BR /&gt;{&lt;BR /&gt;*(.ARM.extab* .gnu.linkonce.armextab.*)&lt;BR /&gt;} &amp;gt; PFLASH&lt;/P&gt;
&lt;P&gt;__exidx_start = .;&lt;BR /&gt;.ARM.exidx :&lt;BR /&gt;{&lt;BR /&gt;*(.ARM.exidx* .gnu.linkonce.armexidx.*)&lt;BR /&gt;} &amp;gt; PFLASH&lt;BR /&gt;__exidx_end = .;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not present in linker file for RTD project for some reasons. And in your case, it looks like it is somehow forced to data flash by default. Please try to use the above definition in your linker file to force it to program flash. I guess that this could solve your problem. &lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 16:01:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1610112#M21157</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2023-03-06T16:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to write data into data flash (S32K344)</title>
      <link>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1610365#M21167</link>
      <description>&lt;P&gt;Dear Lukas,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for solving my problem.&lt;/P&gt;&lt;P&gt;Return to normal state, there is no redundant data in the data flash.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Foxconn_0-1678150727853.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213369i7013EEA177AB26A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Foxconn_0-1678150727853.png" alt="Foxconn_0-1678150727853.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other than that, I'm not sure about creating a S32DS new project without an RTD.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My approach is to create an empty project to add the RTD functionality.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Does it have side effects?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Foxconn_1-1678150859942.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213372i0A26EAAC5F5C0A4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Foxconn_1-1678150859942.png" alt="Foxconn_1-1678150859942.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THX&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 01:12:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1610365#M21167</guid>
      <dc:creator>Foxconn</dc:creator>
      <dc:date>2023-03-07T01:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to write data into data flash (S32K344)</title>
      <link>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1610802#M21184</link>
      <description>&lt;P&gt;Of course, if you use RTD, create new project with RTD.&lt;/P&gt;
&lt;P&gt;I just wanted to highlight that I found that definition in project without RTD. It's not necessary for you to create such project without RTD.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 09:57:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-write-data-into-data-flash-S32K344/m-p/1610802#M21184</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2023-03-07T09:57:38Z</dc:date>
    </item>
  </channel>
</rss>

