<?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 simple GPIO interrupt example ? in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/simple-GPIO-interrupt-example/m-p/411991#M1893</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a Kinetis KL16Z128 processor, developing with &lt;STRONG&gt;KDS 3.0.0&lt;/STRONG&gt; and &lt;STRONG&gt;KSDK 1.2.0 / Processor Expert&lt;/STRONG&gt;.&amp;nbsp; I am looking for a simple project code example of a GPIO input pin triggering an interrupt.&amp;nbsp; Is there one I can look at?&amp;nbsp; So far I have:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Component Inspector:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;gpio1:fsl_gpio&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input pin "SYNC_IN" Interrupt/DMA: Interrupt on falling edge&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;main.h:&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; extern volatile uint32_t syncCount;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;main.c:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; syncCount = 0;&amp;nbsp; // count of sync line input signals (updated in interrupt routine)&lt;/P&gt;&lt;P&gt;&amp;nbsp; INT_SYS_EnableIRQ(PORTA_IRQn);&lt;/P&gt;&lt;P&gt;&amp;nbsp; INT_SYS_EnableIRQGlobal();&lt;/P&gt;&lt;P&gt;&amp;nbsp; do { various stuff... } while ( 1 );&amp;nbsp; // main loop&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;events.c:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; void PORTA_IRQHandler(void) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORT_HAL_ClearPortIntFlag(PORTA_BASE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; syncCount++;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This compiles OK, and it runs, but I never see &lt;STRONG&gt;syncCount&lt;/STRONG&gt; increment from 0, even though I am generating pulses on the PTA_4 input pin ("SYNC_IN") which I can detect using a normal port read from the main.c using&amp;nbsp; &lt;STRONG&gt;GPIO_DRV_ReadPinInput(SYNC_IN)&lt;/STRONG&gt;.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have read through the document &lt;A _jive_internal="true" data-containerid="11234" data-containertype="14" data-objectid="104352" data-objecttype="102" href="https://community.nxp.com/docs/DOC-104352"&gt;Interrupt handling with KSDK and Kinetis Design Studio&lt;/A&gt;&amp;nbsp; and it has useful information, but not quite enough for me to get a project working.&amp;nbsp; Any suggestions would be appreciated. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Nov 2015 01:16:38 GMT</pubDate>
    <dc:creator>johnbeale</dc:creator>
    <dc:date>2015-11-17T01:16:38Z</dc:date>
    <item>
      <title>simple GPIO interrupt example ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/simple-GPIO-interrupt-example/m-p/411991#M1893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a Kinetis KL16Z128 processor, developing with &lt;STRONG&gt;KDS 3.0.0&lt;/STRONG&gt; and &lt;STRONG&gt;KSDK 1.2.0 / Processor Expert&lt;/STRONG&gt;.&amp;nbsp; I am looking for a simple project code example of a GPIO input pin triggering an interrupt.&amp;nbsp; Is there one I can look at?&amp;nbsp; So far I have:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Component Inspector:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;gpio1:fsl_gpio&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Input pin "SYNC_IN" Interrupt/DMA: Interrupt on falling edge&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;main.h:&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; extern volatile uint32_t syncCount;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;main.c:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; syncCount = 0;&amp;nbsp; // count of sync line input signals (updated in interrupt routine)&lt;/P&gt;&lt;P&gt;&amp;nbsp; INT_SYS_EnableIRQ(PORTA_IRQn);&lt;/P&gt;&lt;P&gt;&amp;nbsp; INT_SYS_EnableIRQGlobal();&lt;/P&gt;&lt;P&gt;&amp;nbsp; do { various stuff... } while ( 1 );&amp;nbsp; // main loop&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;events.c:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; void PORTA_IRQHandler(void) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORT_HAL_ClearPortIntFlag(PORTA_BASE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; syncCount++;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This compiles OK, and it runs, but I never see &lt;STRONG&gt;syncCount&lt;/STRONG&gt; increment from 0, even though I am generating pulses on the PTA_4 input pin ("SYNC_IN") which I can detect using a normal port read from the main.c using&amp;nbsp; &lt;STRONG&gt;GPIO_DRV_ReadPinInput(SYNC_IN)&lt;/STRONG&gt;.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have read through the document &lt;A _jive_internal="true" data-containerid="11234" data-containertype="14" data-objectid="104352" data-objecttype="102" href="https://community.nxp.com/docs/DOC-104352"&gt;Interrupt handling with KSDK and Kinetis Design Studio&lt;/A&gt;&amp;nbsp; and it has useful information, but not quite enough for me to get a project working.&amp;nbsp; Any suggestions would be appreciated. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 01:16:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/simple-GPIO-interrupt-example/m-p/411991#M1893</guid>
      <dc:creator>johnbeale</dc:creator>
      <dc:date>2015-11-17T01:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: simple GPIO interrupt example ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/simple-GPIO-interrupt-example/m-p/411992#M1894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Could you please show your code clearly , or how do you configure the component of fsl_gpio .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;nbsp; Under the SDK1.2 , there is a GPIO interrupt demo :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Freescale\KSDK_1.2.0\examples\frdmkl26z\driver_examples\gpio &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; this demo is about KL26, while the configuration is the same with KL16, you can refer to .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 02:18:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/simple-GPIO-interrupt-example/m-p/411992#M1894</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-11-17T02:18:13Z</dc:date>
    </item>
  </channel>
</rss>

