<?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>Kinetis MicrocontrollersのトピックRe: Securing Kinetis, but then flash sectors are still readable.Where is my error?</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Securing-Kinetis-but-then-flash-sectors-are-still-readable-Where/m-p/1893986#M66479</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Pls refer to section 27.3.1 Flash Configuration Field Description in RM of KL03, the flash configuration field is located at 0x400 to 0x40F.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1719374051119.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/285738i2D3F466BCE55A34A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1719374051119.png" alt="xiangjun_rong_0-1719374051119.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="xiangjun_rong_1-1719374172104.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/285739i454648C9F765A6C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_1-1719374172104.png" alt="xiangjun_rong_1-1719374172104.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV style="background-color: #ffffff; padding: 0px 0px 0px 2px;"&gt;
&lt;DIV style="color: #000000; background-color: #ffffff; font-family: 'Consolas'; font-size: 10pt; white-space: pre;"&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;__attribute__&lt;/SPAN&gt;&lt;SPAN&gt; ((used,section(&lt;/SPAN&gt;&lt;SPAN&gt;".FlashConfig"&lt;/SPAN&gt;&lt;SPAN&gt;))) &lt;/SPAN&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;struct&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;unsigned&lt;/SPAN&gt; &lt;SPAN&gt;int&lt;/SPAN&gt; &lt;SPAN&gt;word1&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;unsigned&lt;/SPAN&gt; &lt;SPAN&gt;int&lt;/SPAN&gt; &lt;SPAN&gt;word2&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;unsigned&lt;/SPAN&gt; &lt;SPAN&gt;int&lt;/SPAN&gt; &lt;SPAN&gt;word3&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;unsigned&lt;/SPAN&gt; &lt;SPAN&gt;int&lt;/SPAN&gt; &lt;SPAN&gt;word4&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;Flash_Config&lt;/SPAN&gt;&lt;SPAN&gt; = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFF3DFF};&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;The 0xFFFFF3DFF/0xFFFFF3DFC/0xFFFFF3DFD all can set the chip in security mode.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;I suppose it is correct that the last word is 0xFFFF3DFF, which will set the chip in&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; security mode&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;Pls check if the the flash configuration field&amp;nbsp;address is correct or not.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;Hope it can help you&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 26 Jun 2024 03:59:49 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2024-06-26T03:59:49Z</dc:date>
    <item>
      <title>Securing Kinetis, but then flash sectors are still readable.Where is my error?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Securing-Kinetis-but-then-flash-sectors-are-still-readable-Where/m-p/1892649#M66466</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I'm working with an entry level microcontroller(MKL03 family) using P&amp;amp;E Universal Multilink as programmer-debugger.&lt;BR /&gt;&lt;BR /&gt;I have some code and some data in declared sectors of the Flash area ,say at address&amp;nbsp;0x3200 until 0x32FF.&lt;BR /&gt;In&amp;nbsp;startup_MKL03Z4.s i change the byte showed in bold format&lt;/P&gt;&lt;P&gt;/* Flash Configuration */&lt;BR /&gt;.section .FlashConfig, "a"&lt;BR /&gt;.long 0xFFFFFFFF&lt;BR /&gt;.long 0xFFFFFFFF&lt;BR /&gt;.long 0xFFFFFFFF&lt;BR /&gt;.long 0xFFFF3D&lt;STRONG&gt;FE &lt;/STRONG&gt;-&amp;gt;&amp;nbsp;0xFFFF3DFF&lt;BR /&gt;&lt;BR /&gt;I was confident this should be enough to secure the memory.&lt;BR /&gt;&lt;BR /&gt;Then I launch debugging from a different- almost-empty project ,in Debug Configurations -&amp;gt;Debugger-&amp;gt; Advanced Options i flag Preserve this range&amp;nbsp;&amp;nbsp;0x3200 - 0x32FF .I still can see the data previously stored in this area.I guess this is because some error i did ,or something still missing.&lt;BR /&gt;&lt;BR /&gt;I would like the no one ,me neither ,should be able to read code or data already present in microcontroller .It is possible to secure it without Flash protection ,so that the microcontroller could be erased or reprogrammed?&lt;BR /&gt;And is it possible with some standalone tool ?&lt;BR /&gt;Thanks,&lt;BR /&gt;Diego.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 07:04:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Securing-Kinetis-but-then-flash-sectors-are-still-readable-Where/m-p/1892649#M66466</guid>
      <dc:creator>diegocolombo</dc:creator>
      <dc:date>2024-06-24T07:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Securing Kinetis, but then flash sectors are still readable.Where is my error?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Securing-Kinetis-but-then-flash-sectors-are-still-readable-Where/m-p/1893986#M66479</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Pls refer to section 27.3.1 Flash Configuration Field Description in RM of KL03, the flash configuration field is located at 0x400 to 0x40F.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1719374051119.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/285738i2D3F466BCE55A34A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1719374051119.png" alt="xiangjun_rong_0-1719374051119.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="xiangjun_rong_1-1719374172104.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/285739i454648C9F765A6C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_1-1719374172104.png" alt="xiangjun_rong_1-1719374172104.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV style="background-color: #ffffff; padding: 0px 0px 0px 2px;"&gt;
&lt;DIV style="color: #000000; background-color: #ffffff; font-family: 'Consolas'; font-size: 10pt; white-space: pre;"&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;__attribute__&lt;/SPAN&gt;&lt;SPAN&gt; ((used,section(&lt;/SPAN&gt;&lt;SPAN&gt;".FlashConfig"&lt;/SPAN&gt;&lt;SPAN&gt;))) &lt;/SPAN&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;struct&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;unsigned&lt;/SPAN&gt; &lt;SPAN&gt;int&lt;/SPAN&gt; &lt;SPAN&gt;word1&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;unsigned&lt;/SPAN&gt; &lt;SPAN&gt;int&lt;/SPAN&gt; &lt;SPAN&gt;word2&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;unsigned&lt;/SPAN&gt; &lt;SPAN&gt;int&lt;/SPAN&gt; &lt;SPAN&gt;word3&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;unsigned&lt;/SPAN&gt; &lt;SPAN&gt;int&lt;/SPAN&gt; &lt;SPAN&gt;word4&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;Flash_Config&lt;/SPAN&gt;&lt;SPAN&gt; = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFF3DFF};&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;The 0xFFFFF3DFF/0xFFFFF3DFC/0xFFFFF3DFD all can set the chip in security mode.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;I suppose it is correct that the last word is 0xFFFF3DFF, which will set the chip in&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt; security mode&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;Pls check if the the flash configuration field&amp;nbsp;address is correct or not.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;Hope it can help you&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&lt;SPAN&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Jun 2024 03:59:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Securing-Kinetis-but-then-flash-sectors-are-still-readable-Where/m-p/1893986#M66479</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-06-26T03:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Securing Kinetis, but then flash sectors are still readable.Where is my error?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Securing-Kinetis-but-then-flash-sectors-are-still-readable-Where/m-p/1896699#M66485</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi XiangJun Rong,&lt;BR /&gt;thanks to you for your reply.&lt;BR /&gt;I am still far to have my microcontroller secured.&lt;BR /&gt;My doubt is that something in the debugging environment is wrong and overrides the codes about the settings in FTFA_SEC.&lt;BR /&gt;Let me explain:&lt;BR /&gt;Programmer USB Multilink Universal, Kinetis Design Studio&amp;nbsp; (it is a reprise of an old project ,of before MCUXpresso).&lt;BR /&gt;I use the debugging environment to check if it is possible to peep inside the memory.&lt;BR /&gt;What i notice is&lt;BR /&gt;&lt;STRONG&gt;1)&lt;/STRONG&gt; The memory looks fully exposed to the Memoy Browser&lt;BR /&gt;&lt;STRONG&gt;2)&lt;/STRONG&gt;The data in FlashConfig sector looks different fom what expected , FTFA_SEC=0xFFFF3D&lt;STRONG&gt;FE &lt;/STRONG&gt;despite in code it was set&amp;nbsp;FTFA_SEC=0xFFFF3D&lt;STRONG&gt;FF.&lt;/STRONG&gt;It looks that in code there are at least 2 ways to do that .&lt;BR /&gt;In startup_MKL03Z4.s or ,as you suggested ,in code ,by the declaration of FlashConfig.&lt;BR /&gt;In both ways something else overrides this configuration,as shown in screensot&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FTFA_SEC.jpg" style="width: 450px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/286443iB1EF08A7698D859B/image-size/large?v=v2&amp;amp;px=999" role="button" title="FTFA_SEC.jpg" alt="FTFA_SEC.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could it be something in debug confguration?&lt;BR /&gt;The only thing that i see related to flash security is in the box Commands&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Debug configuration.jpg" style="width: 663px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/286449i155C02CA34963C60/image-size/large?v=v2&amp;amp;px=999" role="button" title="Debug configuration.jpg" alt="Debug configuration.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 13:28:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Securing-Kinetis-but-then-flash-sectors-are-still-readable-Where/m-p/1896699#M66485</guid>
      <dc:creator>diegocolombo</dc:creator>
      <dc:date>2024-07-01T13:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Securing Kinetis, but then flash sectors are still readable.Where is my error?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Securing-Kinetis-but-then-flash-sectors-are-still-readable-Where/m-p/1897137#M66487</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;The security mode can block JTAG port so that the external user can not read the data from flash.&lt;/P&gt;
&lt;P&gt;But the security mode can work only after you write the flash configuration area and RESET. After reset, the data in flash configuration area are copied to registers automatically then the security mode is valid.&lt;/P&gt;
&lt;P&gt;Pls press reset and check if the JTAG is blocked.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 05:02:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Securing-Kinetis-but-then-flash-sectors-are-still-readable-Where/m-p/1897137#M66487</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-07-02T05:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Securing Kinetis, but then flash sectors are still readable.Where is my error?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Securing-Kinetis-but-then-flash-sectors-are-still-readable-Where/m-p/1897417#M66490</link>
      <description>&lt;P&gt;Thank you so much for your further reply Mr Rong.&lt;BR /&gt;Issuing Reset(even with power off-on) does noto change the situation&lt;BR /&gt;I think is better to use 0xFFFF&lt;STRONG&gt;3B&lt;/STRONG&gt;FF instead of 0xFFFF&lt;STRONG&gt;3D&lt;/STRONG&gt;FF ,with 0x3D looks running only in debug mode&lt;BR /&gt;(notice that you added an extra 'F' in your example).&lt;BR /&gt;Resuming last tests: I used the Flash Programmer Tool,the button with the lighting symbol, to program and to write the "secret sector".In this way I have no doubt that debugger does not override the FlashConfig settings,in order to allow the debug itself.In this way the MKL03 is programmed in Secure Mode(0xFFFF3BFF).&lt;BR /&gt;Then i load a simple "Hello Word " almost empty program,having attention in setting my "secret sector" address and size in "Preserve this range" in DebugConfiguration-&amp;gt;Debugger-&amp;gt;Advanced Options .&lt;BR /&gt;FlashConfig last word is set at 0xFFFF3BFE (not secured).Launching debug the "secret sector" is in view and I can read the data from previous program(the data i want to be inaccessible).&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 10:08:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Securing-Kinetis-but-then-flash-sectors-are-still-readable-Where/m-p/1897417#M66490</guid>
      <dc:creator>diegocolombo</dc:creator>
      <dc:date>2024-07-02T10:08:19Z</dc:date>
    </item>
  </channel>
</rss>

