<?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: K82, limit access to GPIO ports by AIPS0 bridge</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-limit-access-to-GPIO-ports-by-AIPS0-bridge/m-p/794806#M48397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eugene,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;P&gt;And I start to think if AIPS protect PORTC&amp;nbsp; ( 0x4004B000) only, but not GPIOC ( 0x400FF080).&lt;/P&gt;&lt;P&gt;Can it be so ?&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes,&amp;nbsp; you are correct on this. If you go to the reference manual, chapter 64&amp;nbsp; you will see the following information.&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;The GPIO module does not have access protection because it is not connected to a peripheral bridge slot and is not protected by the MPU.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In the following image you can see that in fact the GPIO module is not connected neither to the MPU and the peripheral bridge.&amp;nbsp;&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/63313iD320A02207CF5325/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_7.jpg" alt="pastedImage_7.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;Victor.&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Aug 2018 15:22:34 GMT</pubDate>
    <dc:creator>victorjimenez</dc:creator>
    <dc:date>2018-08-20T15:22:34Z</dc:date>
    <item>
      <title>K82, limit access to GPIO ports by AIPS0 bridge</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-limit-access-to-GPIO-ports-by-AIPS0-bridge/m-p/794803#M48394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I understand right and by using AIPS0 peripheral bridge it is possible to limit access to PORTA-PORTAE&lt;/P&gt;&lt;P&gt;registers only ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can disable access with User privileges to PORTA-PORTE :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AIPS0-&amp;gt;PACRJ = 0x44444444ul ; // Disable User access to Multiplexor Port A,B,C,D,E&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this settings dosn't have any effect to GPIOA-GPIOE ports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As result, any task with User privileges can manipulate GPIO pins by using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GPIO_PinWrite(GPIOC, 8, 0) for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is any way exists for limit access to GPIO ports ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Eugene&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2018 08:32:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-limit-access-to-GPIO-ports-by-AIPS0-bridge/m-p/794803#M48394</guid>
      <dc:creator>EugeneHiihtaja</dc:creator>
      <dc:date>2018-08-16T08:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: K82, limit access to GPIO ports by AIPS0 bridge</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-limit-access-to-GPIO-ports-by-AIPS0-bridge/m-p/794804#M48395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eugene,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the reference manual you can see that the slots for the PORTA, PORTB, PORTC, PORTD and PORTE are 73 to 77 respectively.&amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/63346iB95205DA2D4AA48A/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.jpg" alt="pastedImage_1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And this slots are in the register PACRJ, so you are correct on this. But you are writing to the wrong bit, lets take as an example the PORT A, that is in the slot 73.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/63405i350A4403FAAC1592/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.jpg" alt="pastedImage_2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The slot 73 is located in the bits 24:27 of the register. In the next image you can see the equivalence of each bit for the slot 73.&amp;nbsp;&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/63439i63D873D0677CBA97/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.jpg" alt="pastedImage_3.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you want to enable the write protection you should write in the bit 25, but with the number you are passing (0x44444444) you are actually writing to the 26 bit instead of the 25. This goes for all the ports not only the PORT A.&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/63479iC6F4DFD81A0E6223/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_4.jpg" alt="pastedImage_4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is why you cannot see any effect on the write protection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;Victor.&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2018 22:01:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-limit-access-to-GPIO-ports-by-AIPS0-bridge/m-p/794804#M48395</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2018-08-17T22:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: K82, limit access to GPIO ports by AIPS0 bridge</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-limit-access-to-GPIO-ports-by-AIPS0-bridge/m-p/794805#M48396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Victor !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code, what is execute line&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;GPIO_PinWrite(GPIOC, 8, 0) running with &lt;STRONG&gt;User privilidges&lt;/STRONG&gt;. (I'm using FreeRTOS what utilize K82'z MPU).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I assume if access to PORTC configured in way :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;AIPS0-&amp;gt;PACRJ = xxx7xxxx; // PACR 75 [ 19 : 16]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Any access to PORTC/GPIOC addresses should cause BusFault. But it not happens.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&lt;STRONG&gt;bit - 18&lt;/STRONG&gt;&lt;BR /&gt;SP3&lt;BR /&gt;Supervisor Protect&lt;BR /&gt;Determines whether the peripheral requires supervisor privilege level for accesses. When this field is set,&lt;BR /&gt;the master privilege level must indicate the supervisor access attribute, and the MPRx[MPLn] control field&lt;BR /&gt;for the master must be set. If not, access terminates with an error response and no peripheral access&lt;BR /&gt;initiates.&lt;BR /&gt;0 This peripheral does not require supervisor privilege level for accesses.&lt;BR /&gt;&lt;STRONG&gt;1 This peripheral requires supervisor privilege level for accesses.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;STRONG&gt;bit - 17&lt;/STRONG&gt;&lt;BR /&gt;WP3&lt;BR /&gt;Write Protect&lt;BR /&gt;Determines whether the peripheral allows write accesses. When this field is set and a write access is&lt;BR /&gt;attempted, access terminates with an error response and no peripheral access initiates.&lt;BR /&gt;0 This peripheral allows write accesses.&lt;BR /&gt;&lt;STRONG&gt;1 This peripheral is write protected.&amp;nbsp; -&amp;gt; has effect for User and Supervisor accesses&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;STRONG&gt;bit - 16&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;TP3&lt;BR /&gt;Trusted Protect&lt;BR /&gt;Determines whether the peripheral allows accesses from an untrusted master. When this bit is set and an&lt;BR /&gt;access is attempted by an untrusted master, the access terminates with an error response and no&lt;BR /&gt;peripheral access initiates.&lt;BR /&gt;0 Accesses from an untrusted master are allowed.&lt;BR /&gt;&lt;STRONG&gt;1 Accesses from an untrusted master are not allowed.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;And I start to think if AIPS protect PORTC&amp;nbsp; ( 0x4004B000) only, but not GPIOC ( 0x400FF080).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Can it be so ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;My target is to disable manipulation with GPIO pins in code what running with User privileges.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Eugene&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 08:48:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-limit-access-to-GPIO-ports-by-AIPS0-bridge/m-p/794805#M48396</guid>
      <dc:creator>EugeneHiihtaja</dc:creator>
      <dc:date>2018-08-20T08:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: K82, limit access to GPIO ports by AIPS0 bridge</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-limit-access-to-GPIO-ports-by-AIPS0-bridge/m-p/794806#M48397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eugene,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;P&gt;And I start to think if AIPS protect PORTC&amp;nbsp; ( 0x4004B000) only, but not GPIOC ( 0x400FF080).&lt;/P&gt;&lt;P&gt;Can it be so ?&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes,&amp;nbsp; you are correct on this. If you go to the reference manual, chapter 64&amp;nbsp; you will see the following information.&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;The GPIO module does not have access protection because it is not connected to a peripheral bridge slot and is not protected by the MPU.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In the following image you can see that in fact the GPIO module is not connected neither to the MPU and the peripheral bridge.&amp;nbsp;&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/63313iD320A02207CF5325/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_7.jpg" alt="pastedImage_7.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;Victor.&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2018 15:22:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K82-limit-access-to-GPIO-ports-by-AIPS0-bridge/m-p/794806#M48397</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2018-08-20T15:22:34Z</dc:date>
    </item>
  </channel>
</rss>

