<?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 Flash verify section issue ! in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Flash-verify-section-issue/m-p/1295804#M11187</link>
    <description>&lt;P&gt;Hello NXP&lt;/P&gt;&lt;P&gt;Here we are with S32K148 and using flash drivers from SDK. we are performing flash operations from bootloader code on application memory&amp;nbsp;&lt;/P&gt;&lt;P&gt;boot- memory block: 0x00000000 to 0x0003FFFF&lt;/P&gt;&lt;P&gt;app- memory block: 0x00040000 to 0x0017FFFF&lt;/P&gt;&lt;P&gt;Here we are intended to do erase of whole application memory block (0x40000 to 0x17FFFF) and verify it for this we are using "FLASH_DRV_EraseSector" function followed by "FLASH_DRV_VerifySection" in a loop until we reach the last sector of application memory block.&lt;/P&gt;&lt;P&gt;But here continuously we are seeing&amp;nbsp;"FLASH_DRV_VerifySection" got failed at 0x70000 address, arguments we given to&amp;nbsp;"FLASH_DRV_VerifySection" are :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FLASH_DRV_VerifySection(&amp;amp;FlashSSDConfig, Flash_PrgmEraseConfig_s.NextStartAdrs_u32, C_FLASH_SECTOR_SIZE, C_FLASH_ERASE_MARGINLEVEL)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Flash_PrgmEraseConfig_s.NextStartAdrs_u32:&lt;/STRONG&gt; address will get updated in the loop&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C_FLASH_SECTOR_SIZE: &lt;/STRONG&gt;sector size 4kb&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C_FLASH_ERASE_MARGINLEVEL:&amp;nbsp; &lt;/STRONG&gt;user&amp;nbsp;margin level 1&lt;/P&gt;&lt;P&gt;FLASH_DRV_VerifySection(const flash_ssd_config_t * pSSDConfig, uint32_t dest, uint16_t number, uint8_t marginLevel)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Here we suspect in the function arguments we see third argument as number instead of size &amp;amp; we are passing the size is that correct ?.&lt;/LI&gt;&lt;LI&gt;from reference manual we understand we need to give double phrase number which is "128". are we correct on this ?&lt;/LI&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Saitej_0-1624337911710.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147630i4EC81B9D3F2C9862/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Saitej_0-1624337911710.png" alt="Saitej_0-1624337911710.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;But on other side in SDK doxygen document says size. which one is correct ?&lt;/LI&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Saitej_1-1624338011689.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147631iCB266562A2954AA7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Saitej_1-1624338011689.png" alt="Saitej_1-1624338011689.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Please do the needful !&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jun 2021 05:02:44 GMT</pubDate>
    <dc:creator>Saitej</dc:creator>
    <dc:date>2021-06-22T05:02:44Z</dc:date>
    <item>
      <title>Flash verify section issue !</title>
      <link>https://community.nxp.com/t5/S32K/Flash-verify-section-issue/m-p/1295804#M11187</link>
      <description>&lt;P&gt;Hello NXP&lt;/P&gt;&lt;P&gt;Here we are with S32K148 and using flash drivers from SDK. we are performing flash operations from bootloader code on application memory&amp;nbsp;&lt;/P&gt;&lt;P&gt;boot- memory block: 0x00000000 to 0x0003FFFF&lt;/P&gt;&lt;P&gt;app- memory block: 0x00040000 to 0x0017FFFF&lt;/P&gt;&lt;P&gt;Here we are intended to do erase of whole application memory block (0x40000 to 0x17FFFF) and verify it for this we are using "FLASH_DRV_EraseSector" function followed by "FLASH_DRV_VerifySection" in a loop until we reach the last sector of application memory block.&lt;/P&gt;&lt;P&gt;But here continuously we are seeing&amp;nbsp;"FLASH_DRV_VerifySection" got failed at 0x70000 address, arguments we given to&amp;nbsp;"FLASH_DRV_VerifySection" are :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FLASH_DRV_VerifySection(&amp;amp;FlashSSDConfig, Flash_PrgmEraseConfig_s.NextStartAdrs_u32, C_FLASH_SECTOR_SIZE, C_FLASH_ERASE_MARGINLEVEL)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Flash_PrgmEraseConfig_s.NextStartAdrs_u32:&lt;/STRONG&gt; address will get updated in the loop&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C_FLASH_SECTOR_SIZE: &lt;/STRONG&gt;sector size 4kb&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C_FLASH_ERASE_MARGINLEVEL:&amp;nbsp; &lt;/STRONG&gt;user&amp;nbsp;margin level 1&lt;/P&gt;&lt;P&gt;FLASH_DRV_VerifySection(const flash_ssd_config_t * pSSDConfig, uint32_t dest, uint16_t number, uint8_t marginLevel)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Here we suspect in the function arguments we see third argument as number instead of size &amp;amp; we are passing the size is that correct ?.&lt;/LI&gt;&lt;LI&gt;from reference manual we understand we need to give double phrase number which is "128". are we correct on this ?&lt;/LI&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Saitej_0-1624337911710.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147630i4EC81B9D3F2C9862/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Saitej_0-1624337911710.png" alt="Saitej_0-1624337911710.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;But on other side in SDK doxygen document says size. which one is correct ?&lt;/LI&gt;&lt;LI&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Saitej_1-1624338011689.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147631iCB266562A2954AA7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Saitej_1-1624338011689.png" alt="Saitej_1-1624338011689.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Please do the needful !&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 05:02:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Flash-verify-section-issue/m-p/1295804#M11187</guid>
      <dc:creator>Saitej</dc:creator>
      <dc:date>2021-06-22T05:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Flash verify section issue !</title>
      <link>https://community.nxp.com/t5/S32K/Flash-verify-section-issue/m-p/1296838#M11194</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/181201"&gt;@Saitej&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I guess this is because it crosses a PFlash block boundary.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1624447190277.png" style="width: 657px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147779i60D98B485730B910/image-dimensions/657x224?v=v2" width="657" height="224" role="button" title="danielmartynek_0-1624447190277.png" alt="danielmartynek_0-1624447190277.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;There are 3 blocks (read partitions) from 0x0000_0000 to 0x0017_FFFF.&lt;/P&gt;
&lt;P&gt;Once block 0x0008_0000.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_1-1624447270223.png" style="width: 575px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147780iE65537F43A3496C0/image-dimensions/575x520?v=v2" width="575" height="520" role="button" title="danielmartynek_1-1624447270223.png" alt="danielmartynek_1-1624447270223.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;One sector is 4096 bytes.&lt;/P&gt;
&lt;P&gt;One double phrase is 128bits = 16bytes.&lt;/P&gt;
&lt;P&gt;256 double phrases in one sector.&lt;/P&gt;
&lt;P&gt;If you pass 256 as the third argument it should work.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 11:33:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Flash-verify-section-issue/m-p/1296838#M11194</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2021-06-23T11:33:02Z</dc:date>
    </item>
  </channel>
</rss>

