<?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: Read the pin value of a configured peripheral in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Read-the-pin-value-of-a-configured-peripheral/m-p/375992#M19739</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jeffrey Stewart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is correct, BitIO and SPI components cannot share the pin. However adding a component just to read a pin value is probably an overkill. You can simply read directly the input data register, like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14262655024263109" jivemacro_uid="_14262655024263109" modifiedtitle="true"&gt;
&lt;P&gt;if(GPIOx_PDIR &amp;amp; (PIN_MASK))&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace &lt;STRONG&gt;x&lt;/STRONG&gt; with the port (A, B, C...) and &lt;STRONG&gt;PIN_MASK&lt;/STRONG&gt; with the corresponding pin mask, e.g. &lt;STRONG&gt;(1 &amp;lt;&amp;lt; 17)&lt;/STRONG&gt; for PTA17.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards!,&lt;BR /&gt;Jorge Gonzalez&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Mar 2015 16:57:35 GMT</pubDate>
    <dc:creator>Jorge_Gonzalez</dc:creator>
    <dc:date>2015-03-13T16:57:35Z</dc:date>
    <item>
      <title>Read the pin value of a configured peripheral</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Read-the-pin-value-of-a-configured-peripheral/m-p/375991#M19738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am configuring the FRDM-K22F board with a Linear Tech LTC2449 ADC, which is connected via SPI.&amp;nbsp; The ADC signals that a conversion is complete by driving the MISO pin low when CS is toggled low.&amp;nbsp; In the example code from Linear, they drive the CS line low and then read the state of the MISO pin directly to determine if the End of Conversion(EOC) event has occurred.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to Freescale / Kinetis Design Studio, and am trying to configure my project so that I can read the pin state (MISO) while that pin is being used by an SPI module.&amp;nbsp; I have attempted to use the BITIO Component configured as an Input, but it throws an error that says "Selected value is in conflict with another configuration property. . ."&amp;nbsp; What is the correct way to read the Pin value (PTC7) when that pin is allocated to an SPI component?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a sneaking suspicion that I am over-thinking this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2015 06:50:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Read-the-pin-value-of-a-configured-peripheral/m-p/375991#M19738</guid>
      <dc:creator>covejstewart</dc:creator>
      <dc:date>2015-03-11T06:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Read the pin value of a configured peripheral</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Read-the-pin-value-of-a-configured-peripheral/m-p/375992#M19739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jeffrey Stewart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is correct, BitIO and SPI components cannot share the pin. However adding a component just to read a pin value is probably an overkill. You can simply read directly the input data register, like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14262655024263109" jivemacro_uid="_14262655024263109" modifiedtitle="true"&gt;
&lt;P&gt;if(GPIOx_PDIR &amp;amp; (PIN_MASK))&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace &lt;STRONG&gt;x&lt;/STRONG&gt; with the port (A, B, C...) and &lt;STRONG&gt;PIN_MASK&lt;/STRONG&gt; with the corresponding pin mask, e.g. &lt;STRONG&gt;(1 &amp;lt;&amp;lt; 17)&lt;/STRONG&gt; for PTA17.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards!,&lt;BR /&gt;Jorge Gonzalez&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 16:57:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Read-the-pin-value-of-a-configured-peripheral/m-p/375992#M19739</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-03-13T16:57:35Z</dc:date>
    </item>
  </channel>
</rss>

