<?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のトピックDoes it need to disable cache when write/erase PFLASH, DFLASH for S32k146 project.</title>
    <link>https://community.nxp.com/t5/S32K/Does-it-need-to-disable-cache-when-write-erase-PFLASH-DFLASH-for/m-p/915745#M4747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;At present I work on write to PFLASH and DFLASH memory. Im little confused about disabling flash cache.&lt;/P&gt;&lt;P&gt;There is flash partitioning example in S32SDK_S32K14x_EAR_0.8.6 where is code disabling flash cache:&lt;/P&gt;&lt;P&gt;/* Disable cache to ensure that all flash operations will take effect instantly, * this is device dependent */&lt;/P&gt;&lt;P&gt;#ifdef S32K144_SERIES&lt;/P&gt;&lt;P&gt;MSCM-&amp;gt;OCMDR[0u] |= MSCM_OCMDR_OCM0(0xFu) | MSCM_OCMDR_OCM1(0xFu) | MSCM_OCMDR_OCM2(0xFu);&lt;/P&gt;&lt;P&gt;MSCM-&amp;gt;OCMDR[1u] |= MSCM_OCMDR_OCM0(0xFu) | MSCM_OCMDR_OCM1(0xFu) | MSCM_OCMDR_OCM2(0xFu);&lt;/P&gt;&lt;P&gt;MSCM-&amp;gt;OCMDR[2u] |= MSCM_OCMDR_OCM0(0xFu) | MSCM_OCMDR_OCM1(0xFu) | MSCM_OCMDR_OCM2(0xFu);&lt;/P&gt;&lt;P&gt;MSCM-&amp;gt;OCMDR[3u] |= MSCM_OCMDR_OCM0(0xFu) | MSCM_OCMDR_OCM1(0xFu) | MSCM_OCMDR_OCM2(0xFu);&lt;/P&gt;&lt;P&gt;#endif /* S32K144_SERIES */&lt;/P&gt;&lt;P&gt;But in S32K-RM rev. 6 theres no bits OCM0, OCM2 for registers OCMDR[0], OCMDR[1] and any OCMx bits in OCMDr[2] and even register OCMDR[3]. OCM1 is 2bits wide, not 4bits like in axample above. Some of bits which is write in example is Reserved based on S32K-RM.&lt;/P&gt;&lt;P&gt;I think this code should look like this for S32K146:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;S32K14x_RTM_SDK_V2.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;#ifdef S32K146_SERIES&lt;/P&gt;&lt;P&gt;MSCM-&amp;gt;OCMDR[0u] |= MSCM_OCMDR_OCM1(0x3u);&lt;/P&gt;&lt;P&gt;MSCM-&amp;gt;OCMDR[1u] |= MSCM_OCMDR_OCM1(0x3u);&lt;/P&gt;&lt;P&gt;#endif /* S32K146_SERIES */&lt;/P&gt;&lt;P&gt;Please clarify how to disable cache for memories for S32K146. What are advandages/disadvantages for disabling cache when write/erase PFLASH, DFLASH .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i wonder to know&amp;nbsp; it&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;is&lt;/SPAN&gt; necessary to disable cache&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;when write/erase PFLASH, DFLASH .Because i found that if this code existed in my project ,the time of executing every line of code will be slow.when i use IAR compier.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now , In my project I dont use this code,and it can write and erase &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;PFLASHorDFLASH as usual . Does it OK or these may be a bug?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Kai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 May 2019 07:30:55 GMT</pubDate>
    <dc:creator>assangeye</dc:creator>
    <dc:date>2019-05-28T07:30:55Z</dc:date>
    <item>
      <title>Does it need to disable cache when write/erase PFLASH, DFLASH for S32k146 project.</title>
      <link>https://community.nxp.com/t5/S32K/Does-it-need-to-disable-cache-when-write-erase-PFLASH-DFLASH-for/m-p/915745#M4747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;At present I work on write to PFLASH and DFLASH memory. Im little confused about disabling flash cache.&lt;/P&gt;&lt;P&gt;There is flash partitioning example in S32SDK_S32K14x_EAR_0.8.6 where is code disabling flash cache:&lt;/P&gt;&lt;P&gt;/* Disable cache to ensure that all flash operations will take effect instantly, * this is device dependent */&lt;/P&gt;&lt;P&gt;#ifdef S32K144_SERIES&lt;/P&gt;&lt;P&gt;MSCM-&amp;gt;OCMDR[0u] |= MSCM_OCMDR_OCM0(0xFu) | MSCM_OCMDR_OCM1(0xFu) | MSCM_OCMDR_OCM2(0xFu);&lt;/P&gt;&lt;P&gt;MSCM-&amp;gt;OCMDR[1u] |= MSCM_OCMDR_OCM0(0xFu) | MSCM_OCMDR_OCM1(0xFu) | MSCM_OCMDR_OCM2(0xFu);&lt;/P&gt;&lt;P&gt;MSCM-&amp;gt;OCMDR[2u] |= MSCM_OCMDR_OCM0(0xFu) | MSCM_OCMDR_OCM1(0xFu) | MSCM_OCMDR_OCM2(0xFu);&lt;/P&gt;&lt;P&gt;MSCM-&amp;gt;OCMDR[3u] |= MSCM_OCMDR_OCM0(0xFu) | MSCM_OCMDR_OCM1(0xFu) | MSCM_OCMDR_OCM2(0xFu);&lt;/P&gt;&lt;P&gt;#endif /* S32K144_SERIES */&lt;/P&gt;&lt;P&gt;But in S32K-RM rev. 6 theres no bits OCM0, OCM2 for registers OCMDR[0], OCMDR[1] and any OCMx bits in OCMDr[2] and even register OCMDR[3]. OCM1 is 2bits wide, not 4bits like in axample above. Some of bits which is write in example is Reserved based on S32K-RM.&lt;/P&gt;&lt;P&gt;I think this code should look like this for S32K146:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;S32K14x_RTM_SDK_V2.0.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;#ifdef S32K146_SERIES&lt;/P&gt;&lt;P&gt;MSCM-&amp;gt;OCMDR[0u] |= MSCM_OCMDR_OCM1(0x3u);&lt;/P&gt;&lt;P&gt;MSCM-&amp;gt;OCMDR[1u] |= MSCM_OCMDR_OCM1(0x3u);&lt;/P&gt;&lt;P&gt;#endif /* S32K146_SERIES */&lt;/P&gt;&lt;P&gt;Please clarify how to disable cache for memories for S32K146. What are advandages/disadvantages for disabling cache when write/erase PFLASH, DFLASH .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i wonder to know&amp;nbsp; it&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;is&lt;/SPAN&gt; necessary to disable cache&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;when write/erase PFLASH, DFLASH .Because i found that if this code existed in my project ,the time of executing every line of code will be slow.when i use IAR compier.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now , In my project I dont use this code,and it can write and erase &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word;"&gt;PFLASHorDFLASH as usual . Does it OK or these may be a bug?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Kai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2019 07:30:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Does-it-need-to-disable-cache-when-write-erase-PFLASH-DFLASH-for/m-p/915745#M4747</guid>
      <dc:creator>assangeye</dc:creator>
      <dc:date>2019-05-28T07:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Does it need to disable cache when write/erase PFLASH, DFLASH for S32k146 project.</title>
      <link>https://community.nxp.com/t5/S32K/Does-it-need-to-disable-cache-when-write-erase-PFLASH-DFLASH-for/m-p/915746#M4748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kai, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recommend you to use the newest version of the SDK for the S32K146, S32K1xx RTM SDK v3.0.0.&lt;/P&gt;&lt;P&gt;Please check the following community post (&lt;A _jive_internal="true" href="https://community.nxp.com/thread/501156"&gt;link&lt;/A&gt;) to see how to disable the cache. Disabling the cache is not explicitly&amp;nbsp;required but recommended, this is on the user's responsibility. You could refer to&amp;nbsp;AN4745 (&lt;A href="https://www.nxp.com/docs/en/application-note/AN4745.pdf"&gt;link&lt;/A&gt;) Optimizing Performance on Kinetis&amp;nbsp;K-series MCUs.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/85239i8DE7802622E816E1/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2019 22:34:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Does-it-need-to-disable-cache-when-write-erase-PFLASH-DFLASH-for/m-p/915746#M4748</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2019-06-03T22:34:17Z</dc:date>
    </item>
  </channel>
</rss>

