<?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: Flash Configuration Field - Protection and Secure in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1687889#M65296</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189151"&gt;@AndreVB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, your sequence is correct, FPROT0 has the 8 more significant bits and FPROT3 the 8 least significant bits.&lt;/P&gt;
&lt;P&gt;Also another observation, I have chapter&amp;nbsp;45.3.3.6 as &lt;EM&gt;&lt;STRONG&gt;Program Flash Protection Registers (FTFA_FPROTn)&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;instead of&amp;nbsp;&lt;STRONG&gt;24.3.4.6. &lt;/STRONG&gt;Please make sure you are using the correct reference manual for your&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;K32L2B31VFM0A.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Best regards, Miguel.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2023 20:33:58 GMT</pubDate>
    <dc:creator>Miguel04</dc:creator>
    <dc:date>2023-07-13T20:33:58Z</dc:date>
    <item>
      <title>Flash Configuration Field - Protection and Secure</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1683545#M65258</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have an aplication using&amp;nbsp;K32L2B31VFM0A (256k FLASH).&amp;nbsp;I want to secure and protect 64k of the flash by modifiying the file startup_k32l2b31a.c file.&lt;/P&gt;&lt;P&gt;Can you please confirm this is the correct configuration setup?&lt;/P&gt;&lt;P&gt;Flash_Config =&amp;nbsp;{0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFF00, 0xFFFF3FFF};&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I verify the protection was effective?&lt;/P&gt;&lt;P&gt;I read somewhere (I can't find where anymore) that ....., 0xFFFF3F&lt;FONT color="#FF00FF"&gt;&lt;STRONG&gt;FC&lt;/STRONG&gt;&lt;/FONT&gt;}; would be more appropriate. Can you please confirm that?&lt;/P&gt;&lt;P&gt;I using MCUXpresso IDE v11.7.0 +&amp;nbsp; SDK&lt;/P&gt;&lt;P&gt;Thank you very much! Andre&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 13:41:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1683545#M65258</guid>
      <dc:creator>AndreVB</dc:creator>
      <dc:date>2023-07-12T13:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Configuration Field - Protection and Secure</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1685096#M65271</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189151"&gt;@AndreVB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more detailed information please read this application notes:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN5112.pdf" target="_self"&gt;AN5112&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN4507.pdf" target="_self"&gt;AN4507&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Before executing any flash security feature please make sure the state in which it will be configured, since this can secure completely your board and you will note be able to reprogramm it.&lt;/P&gt;
&lt;P&gt;Best Regards, Miguel.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 18:05:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1685096#M65271</guid>
      <dc:creator>Miguel04</dc:creator>
      <dc:date>2023-07-10T18:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Configuration Field - Protection and Secure</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1685218#M65273</link>
      <description>&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;I already read&amp;nbsp; both AN and I can't find the information I need there. Could you please be more specific?&amp;nbsp; I have three questions:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&amp;nbsp;{0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFF00, 0xFFFF3FFF}; to&amp;nbsp;&lt;SPAN&gt;secure and protect 64k.&amp;nbsp; &amp;nbsp;IS THAT CORRECT?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2.&amp;nbsp;How can I verify the protection was effective?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. Is , 0xFFFF3&lt;/SPAN&gt;F&lt;SPAN&gt;&lt;FONT color="#FF00FF"&gt;&lt;STRONG&gt;FC&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;the same as&amp;nbsp;0xFFFF3F&lt;SPAN&gt;&lt;FONT color="#FF00FF"&gt;&lt;STRONG&gt;FF&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;?&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp;Andre&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 13:41:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1685218#M65273</guid>
      <dc:creator>AndreVB</dc:creator>
      <dc:date>2023-07-12T13:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Configuration Field - Protection and Secure</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1685956#M65277</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189151"&gt;@AndreVB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The last 8 bits you are modifying affects the FTFA_FSEC register.&lt;/P&gt;
&lt;P&gt;Please look into&amp;nbsp;&lt;STRONG&gt;2.1.1 FSEC register and field settings&lt;/STRONG&gt; from AN4507 or&amp;nbsp;&lt;STRONG&gt;45.3.3.3 Flash Security Register (FTFA_FSEC)&lt;/STRONG&gt; from your reference manual.&lt;/P&gt;
&lt;P&gt;As the appnote and the manual says, this configure features such as:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Backdoor Key Security Enable&lt;/LI&gt;
&lt;LI&gt;Mass Erase Enable&lt;/LI&gt;
&lt;LI&gt;Factory Security Level Access Code&lt;/LI&gt;
&lt;LI&gt;Flash Security&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Please check this chapters an read the register description.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q1&lt;/STRONG&gt;: Yes with the last one&amp;nbsp;&lt;SPAN&gt;0xFFFF3FFF you will secure the flash.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Q2&lt;/STRONG&gt;: By changing the FTFA_FSEC register the flash will be secured, however, a method you can use to verify that the flash is secured by trying to initiate a debug session and it should return with an error.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Q3&lt;/STRONG&gt;: According to the chapters I mentioned before, yes they are the same.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Please be carefull if you want to test this, I recommend you to keep the mass erase &lt;STRONG&gt;ENABLE,&lt;/STRONG&gt; since combining security enable and mass erase &lt;STRONG&gt;DISABLE&lt;/STRONG&gt; you will not be able to recover the board.&lt;/P&gt;
&lt;P&gt;This method will secure all the flash, I will look for information to verify if it is possible to just secure a specified amount of bytes on the flash.&lt;/P&gt;
&lt;P&gt;I hope this was a more informative for you.&lt;/P&gt;
&lt;P&gt;Best Regards, Miguel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 18:54:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1685956#M65277</guid>
      <dc:creator>Miguel04</dc:creator>
      <dc:date>2023-07-11T18:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Configuration Field - Protection and Secure</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1686700#M65285</link>
      <description>&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;Thank you for the very detailed explanation. Agree, the Flash is SECURE now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The remaining question is about the &lt;STRONG&gt;PROTECTION&lt;/STRONG&gt; (FPROTn in &lt;FONT color="#0000FF"&gt;blue&lt;/FONT&gt;).&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the&amp;nbsp;&lt;STRONG&gt;RM 24.3.4.6&lt;/STRONG&gt;&amp;nbsp;each bit protects (Total Flash size/32) = 8k. So it seems I need to protect (clear) 8 bits of &lt;FONT color="#0000FF"&gt;FPROT3&lt;/FONT&gt; in order to protect 64k of 256k Flash. But I'm not so sure about the sequence of the field in blue. Can you please confirm that?&lt;/P&gt;&lt;P&gt;Flash_Config = {0xFFFFFFFF, 0xFFFFFFFF,&amp;nbsp;&lt;FONT color="#0000FF"&gt;FPROT0&amp;nbsp; FPROT1&amp;nbsp; FPROT2&amp;nbsp; &lt;STRONG&gt;FPROT3&lt;/STRONG&gt;&lt;/FONT&gt;, 0xFFFF3FFF};&lt;/P&gt;&lt;P&gt;Flash_Config = {0xFFFFFFFF, 0xFFFFFFFF, &lt;FONT color="#0000FF"&gt;0xFF&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FF&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FF&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/FONT&gt;, 0xFFFF3FFF};&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Andre&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndreVB_0-1689168977374.png" style="width: 560px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/231964iBCAB739B1EA05FFD/image-dimensions/560x743?v=v2" width="560" height="743" role="button" title="AndreVB_0-1689168977374.png" alt="AndreVB_0-1689168977374.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 14:01:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1686700#M65285</guid>
      <dc:creator>AndreVB</dc:creator>
      <dc:date>2023-07-12T14:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Configuration Field - Protection and Secure</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1687889#M65296</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189151"&gt;@AndreVB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, your sequence is correct, FPROT0 has the 8 more significant bits and FPROT3 the 8 least significant bits.&lt;/P&gt;
&lt;P&gt;Also another observation, I have chapter&amp;nbsp;45.3.3.6 as &lt;EM&gt;&lt;STRONG&gt;Program Flash Protection Registers (FTFA_FPROTn)&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;instead of&amp;nbsp;&lt;STRONG&gt;24.3.4.6. &lt;/STRONG&gt;Please make sure you are using the correct reference manual for your&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;K32L2B31VFM0A.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Best regards, Miguel.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 20:33:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Flash-Configuration-Field-Protection-and-Secure/m-p/1687889#M65296</guid>
      <dc:creator>Miguel04</dc:creator>
      <dc:date>2023-07-13T20:33:58Z</dc:date>
    </item>
  </channel>
</rss>

