<?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 bit manipulation engine in KL in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/bit-manipulation-engine-in-KL/m-p/244878#M9502</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm wondering if I can use BME to know the state of a pin of a port but without to modify the value.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if((GPIOC_PDIR &amp;amp; 0x40)){...&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jan 2014 16:30:53 GMT</pubDate>
    <dc:creator>stefanomanca</dc:creator>
    <dc:date>2014-01-20T16:30:53Z</dc:date>
    <item>
      <title>bit manipulation engine in KL</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/bit-manipulation-engine-in-KL/m-p/244878#M9502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm wondering if I can use BME to know the state of a pin of a port but without to modify the value.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if((GPIOC_PDIR &amp;amp; 0x40)){...&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 16:30:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/bit-manipulation-engine-in-KL/m-p/244878#M9502</guid>
      <dc:creator>stefanomanca</dc:creator>
      <dc:date>2014-01-20T16:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: bit manipulation engine in KL</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/bit-manipulation-engine-in-KL/m-p/244879#M9503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefano:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you mean about reading without modifying?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you read the GPIOx_PDIR register, the values remain, they are not mofidied. Or could you explain a little more please?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 01:17:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/bit-manipulation-engine-in-KL/m-p/244879#M9503</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2014-01-22T01:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: bit manipulation engine in KL</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/bit-manipulation-engine-in-KL/m-p/244880#M9504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge, to know the level of ptc6 I need to do &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 11.818181991577148px;"&gt;(GPIOC_PDIR &amp;amp; 0x40)&lt;/SPAN&gt; that is an AND-bit operation. I wonder if I can avoid to do this operation by BME getting the value of ptc6 immediatelly.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 14:01:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/bit-manipulation-engine-in-KL/m-p/244880#M9504</guid>
      <dc:creator>stefanomanca</dc:creator>
      <dc:date>2014-01-22T14:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Re: bit manipulation engine in KL</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/bit-manipulation-engine-in-KL/m-p/244881#M9505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefano:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had this answer pending for you. I searched and found that it is possible to read one or more bits of a determined peripheral with BME. In fact, there are some example source codes in the KL25_SC package. I guess you have it, but in any case here is the link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FRDM-KL25Z&amp;amp;fpsp=1&amp;amp;tab=Design_Tools_Tab" title="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FRDM-KL25Z&amp;amp;fpsp=1&amp;amp;tab=Design_Tools_Tab"&gt;FRDM-KL25Z: Freescale Freedom Development Platform for Kinetis KL14/15/24/25 MCUs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a header file called "bme,h" which contains macros with the bit manipulation functions. For the case you mentioned, the reading of the bit would be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rdata = BME_UBFX_W(&amp;amp;GPIOC_PDIR, 0x6, 0x1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // rdata is the variable in which you store the PTC6 value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also attaching a presentation with more info regarding BME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 08:12:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/bit-manipulation-engine-in-KL/m-p/244881#M9505</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2014-02-04T08:12:21Z</dc:date>
    </item>
  </channel>
</rss>

