<?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のトピックLPC11E6x Pin Interrupts not working</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11E6x-Pin-Interrupts-not-working/m-p/931432#M37117</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, NxP!&lt;/P&gt;&lt;P&gt;I was trying to use pin interrupts in the &lt;EM&gt;&lt;STRONG&gt;LPC11E6x&lt;/STRONG&gt;&lt;/EM&gt; and they worked for Port 0 but not for Port 1.&lt;BR /&gt;After (re)checking my code several times, I decided to check the NxP's LPCOpen package I'm using. It's the&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;lpcopen_&lt;SPAN style="color: #ff0000;"&gt;3_03&lt;/SPAN&gt;_keil_iar_lpcxpresso_11e68&lt;/STRONG&gt;&lt;/EM&gt;.&lt;BR /&gt;In the&amp;nbsp;syscon_11u6x.c file I found the following code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;/* Setup a pin source for the pin interrupts (0-7) */
void Chip_SYSCTL_SetPinInterrupt(uint32_t intno, uint8_t port, uint8_t pin)
{
&amp;nbsp; if (port == 0) {
&amp;nbsp; /* Pins P0.1 to P0.23 only */
&amp;nbsp; LPC_SYSCTL-&amp;gt;PINTSEL[intno] = (uint32_t) pin;
&amp;nbsp; } else {
&amp;nbsp; /* P1.1 to P1.31 and P2.0 to P2.7 */
&amp;nbsp; LPC_SYSCTL-&amp;gt;PINTSEL[intno] = (uint32_t) ((port - 1) * 32 + pin + 24);
&amp;nbsp; }
}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shuldn't it be like the following?&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;/* Setup a pin source for the pin interrupts (0-7) */
void Chip_SYSCTL_SetPinInterrupt(uint32_t intno, uint8_t port, uint8_t pin)
{
 /* P0.0 to P0.23 and P1.0 to P1.31 */
 if ( (port == 0) || (port == 1) ) {
 /* Pins P0.1 to P0.23 only */
 LPC_SYSCTL-&amp;gt;PINTSEL[intno] = (uint32_t) ((port * 24) + pin);
 }
 else {
 /* P2.0 to P2.7 */
 LPC_SYSCTL-&amp;gt;PINTSEL[intno] = (uint32_t) (56 + pin);
 }
}
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After these changes, all is working well.&lt;/P&gt;&lt;P&gt;If I'm right, I must admit that NxP's documentation is the best I ever see, as it allows you to quickly flag and to correct these errors easily.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 01 Sep 2019 15:02:38 GMT</pubDate>
    <dc:creator>danielribeiro</dc:creator>
    <dc:date>2019-09-01T15:02:38Z</dc:date>
    <item>
      <title>LPC11E6x Pin Interrupts not working</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11E6x-Pin-Interrupts-not-working/m-p/931432#M37117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, NxP!&lt;/P&gt;&lt;P&gt;I was trying to use pin interrupts in the &lt;EM&gt;&lt;STRONG&gt;LPC11E6x&lt;/STRONG&gt;&lt;/EM&gt; and they worked for Port 0 but not for Port 1.&lt;BR /&gt;After (re)checking my code several times, I decided to check the NxP's LPCOpen package I'm using. It's the&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;lpcopen_&lt;SPAN style="color: #ff0000;"&gt;3_03&lt;/SPAN&gt;_keil_iar_lpcxpresso_11e68&lt;/STRONG&gt;&lt;/EM&gt;.&lt;BR /&gt;In the&amp;nbsp;syscon_11u6x.c file I found the following code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;/* Setup a pin source for the pin interrupts (0-7) */
void Chip_SYSCTL_SetPinInterrupt(uint32_t intno, uint8_t port, uint8_t pin)
{
&amp;nbsp; if (port == 0) {
&amp;nbsp; /* Pins P0.1 to P0.23 only */
&amp;nbsp; LPC_SYSCTL-&amp;gt;PINTSEL[intno] = (uint32_t) pin;
&amp;nbsp; } else {
&amp;nbsp; /* P1.1 to P1.31 and P2.0 to P2.7 */
&amp;nbsp; LPC_SYSCTL-&amp;gt;PINTSEL[intno] = (uint32_t) ((port - 1) * 32 + pin + 24);
&amp;nbsp; }
}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shuldn't it be like the following?&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;/* Setup a pin source for the pin interrupts (0-7) */
void Chip_SYSCTL_SetPinInterrupt(uint32_t intno, uint8_t port, uint8_t pin)
{
 /* P0.0 to P0.23 and P1.0 to P1.31 */
 if ( (port == 0) || (port == 1) ) {
 /* Pins P0.1 to P0.23 only */
 LPC_SYSCTL-&amp;gt;PINTSEL[intno] = (uint32_t) ((port * 24) + pin);
 }
 else {
 /* P2.0 to P2.7 */
 LPC_SYSCTL-&amp;gt;PINTSEL[intno] = (uint32_t) (56 + pin);
 }
}
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After these changes, all is working well.&lt;/P&gt;&lt;P&gt;If I'm right, I must admit that NxP's documentation is the best I ever see, as it allows you to quickly flag and to correct these errors easily.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2019 15:02:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11E6x-Pin-Interrupts-not-working/m-p/931432#M37117</guid>
      <dc:creator>danielribeiro</dc:creator>
      <dc:date>2019-09-01T15:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11E6x Pin Interrupts not working</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11E6x-Pin-Interrupts-not-working/m-p/931433#M37118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="287547" data-username="danielribeiro" href="https://community.nxp.com/people/danielribeiro"&gt;Daniel Ribeiro&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your sharing, I will check it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 09:35:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11E6x-Pin-Interrupts-not-working/m-p/931433#M37118</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-09-03T09:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11E6x Pin Interrupts not working</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11E6x-Pin-Interrupts-not-working/m-p/931434#M37119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Alice!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you checked this issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Nov 2019 20:17:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11E6x-Pin-Interrupts-not-working/m-p/931434#M37119</guid>
      <dc:creator>danielribeiro</dc:creator>
      <dc:date>2019-11-28T20:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11E6x Pin Interrupts not working</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11E6x-Pin-Interrupts-not-working/m-p/931435#M37120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry I haven't find difference between the two functions you shown,&lt;/P&gt;&lt;P&gt;no matter PORT is 0 , 1 or 2, they are the same.&lt;/P&gt;&lt;P&gt;If I'm wrong, could you please tell me the different result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2019 08:11:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11E6x-Pin-Interrupts-not-working/m-p/931435#M37120</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-12-03T08:11:06Z</dc:date>
    </item>
  </channel>
</rss>

