<?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>LPC Microcontrollers中的主题 Re: LPC1347 accessing GPIO registers via halfword</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1347-accessing-GPIO-registers-via-halfword/m-p/711763#M28711</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="293528" data-username="mateuszkiełbasa" href="https://community.nxp.com/people/mateuszkiełbasa"&gt;Mateusz Kie&amp;amp;#322;basa&lt;/A&gt;&lt;/P&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;for the opportunity to serve you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;The MCU supports two kinds way of writing and reading the Pin registers, as the Fig 1 shows.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;You needn't make an own pointer to particular register address&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31440i7CA2A6203E083BA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;Have a great day,&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIC&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>Mon, 25 Sep 2017 02:30:42 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2017-09-25T02:30:42Z</dc:date>
    <item>
      <title>LPC1347 accessing GPIO registers via halfword</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1347-accessing-GPIO-registers-via-halfword/m-p/711762#M28710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am reading lpc1347 user manual. I have read two sentences which I don't understand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;GPIO port adresses can be read and written as bytes, halfwords, or words.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;And GPIO port WORD register description&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Each GPIO pin has a word register in this address range. Any byte, halfword, or word read in this range will be all zeros if the pin is low or all ones if the pin is high[...]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is how to read GPIO registers as bytes or halfword. LPCOpen uses byte&amp;nbsp;access for B&amp;nbsp;register and word access for others.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;typedef struct { /*!&amp;lt; GPIO_PORT Structure */&lt;BR /&gt; __IO uint8_t B[128][32]; /*!&amp;lt; Offset 0x0000: Byte pin registers ports 0 to n; pins PIOn_0 to PIOn_31 */&lt;BR /&gt; __IO uint32_t W[32][32]; /*!&amp;lt; Offset 0x1000: Word pin registers port 0 to n */&lt;BR /&gt; __IO uint32_t DIR[32]; /*!&amp;lt; Offset 0x2000: Direction registers port n */&lt;BR /&gt; __IO uint32_t MASK[32]; /*!&amp;lt; Offset 0x2080: Mask register port n */&lt;BR /&gt; __IO uint32_t PIN[32]; /*!&amp;lt; Offset 0x2100: Portpin register port n */&lt;BR /&gt; __IO uint32_t MPIN[32]; /*!&amp;lt; Offset 0x2180: Masked port register port n */&lt;BR /&gt; __IO uint32_t SET[32]; /*!&amp;lt; Offset 0x2200: Write: Set register for port n Read: output bits for port n */&lt;BR /&gt; __O uint32_t CLR[32]; /*!&amp;lt; Offset 0x2280: Clear port n */&lt;BR /&gt; __O uint32_t NOT[32]; /*!&amp;lt; Offset 0x2300: Toggle port n */&lt;BR /&gt;} LPC_GPIO_T;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I make an own pointer to particular register address and use it as byte or halfword like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;volatile uint8_t *pointer = (volatile uint8_t *) &amp;nbsp;REGISTER_ADDRESS;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2017 07:53:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1347-accessing-GPIO-registers-via-halfword/m-p/711762#M28710</guid>
      <dc:creator>mateuszkiełbasa</dc:creator>
      <dc:date>2017-09-22T07:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1347 accessing GPIO registers via halfword</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1347-accessing-GPIO-registers-via-halfword/m-p/711763#M28711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="293528" data-username="mateuszkiełbasa" href="https://community.nxp.com/people/mateuszkiełbasa"&gt;Mateusz Kie&amp;amp;#322;basa&lt;/A&gt;&lt;/P&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;for the opportunity to serve you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;The MCU supports two kinds way of writing and reading the Pin registers, as the Fig 1 shows.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;You needn't make an own pointer to particular register address&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31440i7CA2A6203E083BA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;Have a great day,&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIC&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>Mon, 25 Sep 2017 02:30:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1347-accessing-GPIO-registers-via-halfword/m-p/711763#M28711</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-09-25T02:30:42Z</dc:date>
    </item>
  </channel>
</rss>

