<?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: Gpio pin interrupt</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Gpio-pin-interrupt/m-p/541114#M12213</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 5,(IOCON_DIGMODE_EN | IOCON_MODE_INACT) );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;/* Configure GPIO pin as input */&lt;BR /&gt;&amp;nbsp;Chip_GPIO_SetPinDIRInput(LPC_GPIO, 0, 5);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;/* Enable PININT clock */&lt;BR /&gt;&amp;nbsp;Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_PININT);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;/* Reset the PININT block */&lt;BR /&gt;&amp;nbsp;Chip_SYSCTL_PeriphReset(RESET_PININT);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;/* Configure interrupt channel for the GPIO pin in INMUX block */&lt;BR /&gt;&amp;nbsp;Chip_INMUX_PinIntSel(0, 0, 5);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;/* Configure channel interrupt as edge sensitive and falling edge interrupt */&lt;BR /&gt;&amp;nbsp;Chip_PININT_ClearIntStatus(LPC_GPIO_PIN_INT, PININTCH(0));&lt;BR /&gt;&amp;nbsp;Chip_PININT_SetPinModeEdge(LPC_GPIO_PIN_INT, PININTCH(0));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//working as high edge interrupt for npn sensor&lt;BR /&gt;&amp;nbsp;Chip_PININT_EnableIntHigh(LPC_GPIO_PIN_INT, PININTCH(0));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//int high edge&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;/* Enable interrupt in the NVIC */&lt;BR /&gt;&amp;nbsp;NVIC_ClearPendingIRQ(PIN_INT0_IRQn);&lt;BR /&gt;&amp;nbsp;NVIC_EnableIRQ(PIN_INT0_IRQn);&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jan 2019 05:53:29 GMT</pubDate>
    <dc:creator>athmesh_n</dc:creator>
    <dc:date>2019-01-18T05:53:29Z</dc:date>
    <item>
      <title>Gpio pin interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Gpio-pin-interrupt/m-p/541110#M12209</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;I am have a problem with receiving interrupts from the gpio pins.&lt;/P&gt;&lt;P&gt;The problem is that I never seem to receive an interrupt.&lt;/P&gt;&lt;P&gt;I can read the pin an have confirmed that it does change however I do not get an interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please advice me what i should do to get the interrupts on the rising and falling edge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14715976621805342 jive_macro_code jive_text_macro" data-hasrefreshed="true" data-renderedposition="215.60000610351562_8_1192_96" jivemacro_uid="_14715976621805342" modifiedtitle="true"&gt;&lt;P&gt;ResetISR()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_SCU_PinMuxSet( 6, 5, (SCU_MODE_MODE_PULLUP | SCU_MODE_INBUFF_EN | SCU_MODE_ZIF_DIS | SCU_MODE_HIGHSPEEDSLEW_EN | SCU_MODE_FUNC0) );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_SCU_PinMuxSet( 1,14, (SCU_MODE_MODE_PULLUP | SCU_MODE_INBUFF_EN | SCU_MODE_ZIF_DIS | SCU_MODE_HIGHSPEEDSLEW_EN | SCU_MODE_FUNC0) );&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;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14715976996708357 jive_text_macro" data-hasrefreshed="true" data-renderedposition="337.54998779296875_8_1192_800" jivemacro_uid="_14715976996708357" modifiedtitle="true"&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static const uint32_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c_controllerPort = 3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static const uint8_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c_controllerPin = 4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static const uint32_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c_responderPort = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static const uint8_t&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c_responderPin = 7;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bool controllerPin = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bool responderPin = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Board_Init();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_Clock_Enable(CLK_MX_GPIO);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_GPIO_Init(LPC_GPIO_PORT);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_GPIO_WriteDirBit(LPC_GPIO_PORT, c_controllerPort, c_controllerPin, false);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_GPIO_WriteDirBit(LPC_GPIO_PORT, c_responderPort, c_responderPin, false);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_GPIO_IntCmd(LPC_GPIO_PIN_INT, c_controllerPort, c_controllerPin, GPIOPININT_RISING_EDGE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_GPIO_IntCmd(LPC_GPIO_PIN_INT, c_controllerPort, c_controllerPin, GPIOPININT_FALLING_EDGE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_GPIO_IntCmd(LPC_GPIO_PIN_INT, c_responderPort, c_responderPin, GPIOPININT_RISING_EDGE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_GPIO_IntCmd(LPC_GPIO_PIN_INT, c_responderPort, c_responderPin, GPIOPININT_FALLING_EDGE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_SCU_GPIOIntPinSel(0, c_controllerPort, c_controllerPin);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_SCU_GPIOIntPinSel(1, c_responderPort, c_responderPin);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_SetPriority(PIN_INT0_IRQn, 1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_SetPriority(PIN_INT1_IRQn, 2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_ClearPendingIRQ(PIN_INT0_IRQn);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_ClearPendingIRQ(PIN_INT1_IRQn);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_EnableIRQ(PIN_INT0_IRQn);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_EnableIRQ(PIN_INT1_IRQn);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(true)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(controllerPin != Chip_GPIO_ReadPortBit(LPC_GPIO_PORT, c_controllerPort, c_controllerPin))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; controllerPin ^= 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(responderPin != Chip_GPIO_ReadPortBit(LPC_GPIO_PORT, c_responderPort, c_responderPin))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; responderPin ^= 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;extern "C" void GPIO0_IRQHandler(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_GPIO_IntClear(LPC_GPIO_PIN_INT, CUartOverGpio::c_controllerPort, CUartOverGpio::c_controllerPin);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_ClearPendingIRQ(PIN_INT0_IRQn);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;extern "C" void GPIO1_IRQHandler(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_GPIO_IntClear(LPC_GPIO_PIN_INT, CUartOverGpio::c_responderPort, CUartOverGpio::c_responderPin);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_ClearPendingIRQ(PIN_INT1_IRQn);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 09:11:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Gpio-pin-interrupt/m-p/541110#M12209</guid>
      <dc:creator>gvisser</dc:creator>
      <dc:date>2016-08-19T09:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Gpio pin interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Gpio-pin-interrupt/m-p/541111#M12210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you let us know which LPC product you are using?&lt;/P&gt;&lt;P&gt;There with an example for GPIO group interrupt for LPC4357 product at &lt;A href="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/lpc-cortex-m-mcus/lpc-cortex-m4/lpc4300-cortex-m4-m0/lpcopen-software-development-platform-lpc43xx:LPCOPEN-SOFTWARE-FOR-LPC43XX"&gt;LPCOpen software&lt;/A&gt; (&lt;STRONG style="box-sizing: border-box; font-weight: bold; color: #333333; font-family: Arial, sans-serif; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;"&gt;Keil MCB4300 &lt;/STRONG&gt;board).&lt;/P&gt;&lt;P&gt;Customer could refer that example as well.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Ma Hui&lt;BR /&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, 09 Sep 2016 08:50:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Gpio-pin-interrupt/m-p/541111#M12210</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2016-09-09T08:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Gpio pin interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Gpio-pin-interrupt/m-p/541112#M12211</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;Thank you for your reply.&lt;BR /&gt;I am using the LPC1837FET100 on a custom PCB.&lt;BR /&gt;I have looked at the the examples hover I did not manage to get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Guido&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 13:41:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Gpio-pin-interrupt/m-p/541112#M12211</guid>
      <dc:creator>gvisser</dc:creator>
      <dc:date>2016-09-12T13:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Gpio pin interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Gpio-pin-interrupt/m-p/541113#M12212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guido,&lt;/P&gt;&lt;P&gt;I'm kind of new to LPC products and currently using the new LPCOpen that what I think you are as the API's are slightly different.&lt;/P&gt;&lt;P&gt;I am using LPCOpen_v2.05. &amp;nbsp;Can you try using new version and the periph_pinint example?&lt;/P&gt;&lt;P&gt;I used my OM13076 (LPC18s37) board to test rising and falling with the SW2 on the board and it works fine.&lt;/P&gt;&lt;P&gt;Attached is my pinint.c with modifications to have both edges working to toggle blue LED.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 19:03:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Gpio-pin-interrupt/m-p/541113#M12212</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-09-14T19:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Gpio pin interrupt</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Gpio-pin-interrupt/m-p/541114#M12213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 5,(IOCON_DIGMODE_EN | IOCON_MODE_INACT) );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;/* Configure GPIO pin as input */&lt;BR /&gt;&amp;nbsp;Chip_GPIO_SetPinDIRInput(LPC_GPIO, 0, 5);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;/* Enable PININT clock */&lt;BR /&gt;&amp;nbsp;Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_PININT);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;/* Reset the PININT block */&lt;BR /&gt;&amp;nbsp;Chip_SYSCTL_PeriphReset(RESET_PININT);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;/* Configure interrupt channel for the GPIO pin in INMUX block */&lt;BR /&gt;&amp;nbsp;Chip_INMUX_PinIntSel(0, 0, 5);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;/* Configure channel interrupt as edge sensitive and falling edge interrupt */&lt;BR /&gt;&amp;nbsp;Chip_PININT_ClearIntStatus(LPC_GPIO_PIN_INT, PININTCH(0));&lt;BR /&gt;&amp;nbsp;Chip_PININT_SetPinModeEdge(LPC_GPIO_PIN_INT, PININTCH(0));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//working as high edge interrupt for npn sensor&lt;BR /&gt;&amp;nbsp;Chip_PININT_EnableIntHigh(LPC_GPIO_PIN_INT, PININTCH(0));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//int high edge&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;/* Enable interrupt in the NVIC */&lt;BR /&gt;&amp;nbsp;NVIC_ClearPendingIRQ(PIN_INT0_IRQn);&lt;BR /&gt;&amp;nbsp;NVIC_EnableIRQ(PIN_INT0_IRQn);&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2019 05:53:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Gpio-pin-interrupt/m-p/541114#M12213</guid>
      <dc:creator>athmesh_n</dc:creator>
      <dc:date>2019-01-18T05:53:29Z</dc:date>
    </item>
  </channel>
</rss>

