<?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>S32KのトピックRe: S32K118 MCAL GPIO interrupt</title>
    <link>https://community.nxp.com/t5/S32K/S32K118-MCAL-GPIO-interrupt/m-p/1073131#M7399</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think for S32K118,&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;ICU_PORT_CI_A_EXT_IRQ_ISR does not work since the Macro defined in Icu_Cfg.h is "ICU_IRQ_SINGLE_INTERRUPT" which enables ISR(ICU_EXT_IRQ_SINGLE_INTERRUPT). I guess this enables a single interrupt for all ports at the hardware interrupt vector 9, is this correct? I am not sure because I did not find this in the Integration Manual but through the "Icu_Port_Ci_Irq.c" file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt; Although there are Macros for&amp;nbsp;ISR(ICU_PORT_CI_D_EXT_IRQ_ISR) etc. they are not enabled since&amp;nbsp;ICU_PORT_3_ISR_USED etc. macro is not defined in the&amp;nbsp;&lt;SPAN&gt;Icu_Cfg.h for this Tresos configuration. Can you tell me&amp;nbsp;for which configurations&amp;nbsp;are these macros defined?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 May 2020 12:32:21 GMT</pubDate>
    <dc:creator>talha_uyar</dc:creator>
    <dc:date>2020-05-15T12:32:21Z</dc:date>
    <item>
      <title>S32K118 MCAL GPIO interrupt</title>
      <link>https://community.nxp.com/t5/S32K/S32K118-MCAL-GPIO-interrupt/m-p/1073129#M7397</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;I am trying to implement interrupt functionality to one of the buttons on S32K118 EVB. I have looked at the GPIO interrupt example provided and tried to copy the functionality. The following is simply the main code. The Button_Handler is a dummy function lighting an LED. In Tresos I simply configured the RGB_RED as GPIO output and SW2 as GPIO input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Mcu_Init(&amp;amp;McuModuleConfiguration);&lt;BR /&gt; Mcu_InitClock(McuClockSettingConfig_0);&lt;BR /&gt; Mcu_SetMode((Mcu_ModeType)MCU_RUN_MODE);&lt;/P&gt;&lt;P&gt;Port_Init(&amp;amp;PortConfigSet);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sys_registerIsrHandler(PORT_IRQn, (uint32)&amp;amp;Button_Handler);&lt;BR /&gt; sys_enableIsrSource(PORT_IRQn, 0x40);&lt;/P&gt;&lt;P&gt;while(1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Should I also do something with the Vector_core.s file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M. Talha Uyar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: I took a look at the GPIO interrupt example for S32K148, and I think the only difference is that in the&amp;nbsp;PINS_DRV_Init() function the pins are configured to be as interrupts. I am guessing this functionality should be handled by the Port_Init() function of MCAL. Should I change the PortPin Mode in EB Tresos. If so, what should be the PortPin Mode of an interrupt pin?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2020 07:51:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K118-MCAL-GPIO-interrupt/m-p/1073129#M7397</guid>
      <dc:creator>talha_uyar</dc:creator>
      <dc:date>2020-05-12T07:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: S32K118 MCAL GPIO interrupt</title>
      <link>https://community.nxp.com/t5/S32K/S32K118-MCAL-GPIO-interrupt/m-p/1073130#M7398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In order to configure interrupt for PortPin in ASR, e.g., interrupt handler when a pin is toggler, you might need to use ICU module. These below steps decribes the configuration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Enable ICU module and configure general parameter:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27106i276791B1878127E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. In IcuHwInterruptConfigList, add all available options, then tick to the port pin for targetting interrupt handling (for example, tick to the PORT_0_CH_3 for triggering interrupt when Pin A3 is toggled:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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/28172iA66F47898C80F551/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. In ICU port tab, add the corresponding port pin to the configuration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/28295i8B35BE70DB64EDC3/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/30360i187F2C480FB04BDF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. In ICU channel, configure ICU signal detection in Port Pin:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link the IcuPortChannelRef to recent created Port pin channel. Choose ICU_MODE_SIGNAL_EDGE_DETECT in IcuMeasurementMode, and choose default start edge for expecting capture edge signal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/108300i5FA7E369B562F19D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enable the Icu Signal Detect option. You can configure notification callback if desired:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/35272iF0F8093CB3D7A45A/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_6.png" alt="pastedImage_6.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition, you need to enable the interrupt source and map the interrupt handler to the NVIC. Please note that the ISR are named by default in the ICU driver, not something that you can created by your own (Please refer to the ICU IM document):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_7.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/108262i70A682128CFE7C3B/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_7.png" alt="pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So it would be like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sys_enableIsrSource(75, 0x70);&lt;BR /&gt; sys_registerIsrHandler(75,(uint32)&amp;amp;ICU_PORT_CI_A_EXT_IRQ_ISR));&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Nam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2020 10:33:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K118-MCAL-GPIO-interrupt/m-p/1073130#M7398</guid>
      <dc:creator>namnguyenviet</dc:creator>
      <dc:date>2020-05-15T10:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: S32K118 MCAL GPIO interrupt</title>
      <link>https://community.nxp.com/t5/S32K/S32K118-MCAL-GPIO-interrupt/m-p/1073131#M7399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think for S32K118,&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;ICU_PORT_CI_A_EXT_IRQ_ISR does not work since the Macro defined in Icu_Cfg.h is "ICU_IRQ_SINGLE_INTERRUPT" which enables ISR(ICU_EXT_IRQ_SINGLE_INTERRUPT). I guess this enables a single interrupt for all ports at the hardware interrupt vector 9, is this correct? I am not sure because I did not find this in the Integration Manual but through the "Icu_Port_Ci_Irq.c" file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt; Although there are Macros for&amp;nbsp;ISR(ICU_PORT_CI_D_EXT_IRQ_ISR) etc. they are not enabled since&amp;nbsp;ICU_PORT_3_ISR_USED etc. macro is not defined in the&amp;nbsp;&lt;SPAN&gt;Icu_Cfg.h for this Tresos configuration. Can you tell me&amp;nbsp;for which configurations&amp;nbsp;are these macros defined?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2020 12:32:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K118-MCAL-GPIO-interrupt/m-p/1073131#M7399</guid>
      <dc:creator>talha_uyar</dc:creator>
      <dc:date>2020-05-15T12:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: S32K118 MCAL GPIO interrupt</title>
      <link>https://community.nxp.com/t5/S32K/S32K118-MCAL-GPIO-interrupt/m-p/1073132#M7400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/talha.uyar@karel.com.tr"&gt;talha.uyar@karel.com.tr&lt;/A&gt;‌&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;I think for S32K118,&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;ICU_PORT_CI_A_EXT_IRQ_ISR does not work since the Macro defined in Icu_Cfg.h is "ICU_IRQ_SINGLE_INTERRUPT" which enables ISR(ICU_EXT_IRQ_SINGLE_INTERRUPT). I guess this enables a single interrupt for all ports at the hardware interrupt vector 9, is this correct? I am not sure because I did not find this in the Integration Manual but through the "Icu_Port_Ci_Irq.c" file.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You're right. I didn't notice that you're asking about s32k118. For this platform, all of ports' interrupts have a single NVIC ID:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="NIVC_ID.JPG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106648i56C540AF289B742B/image-size/large?v=v2&amp;amp;px=999" role="button" title="NIVC_ID.JPG" alt="NIVC_ID.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-family: inherit;"&gt;Although there are Macros for&amp;nbsp;ISR(ICU_PORT_CI_D_EXT_IRQ_ISR) etc. they are not enabled since&amp;nbsp;ICU_PORT_3_ISR_USED etc. macro is not defined in the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; font-family: inherit;"&gt;Icu_Cfg.h for this Tresos configuration. Can you tell me&amp;nbsp;for which configurations&amp;nbsp;are these macros defined?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, you need to map this ISR:&amp;nbsp;ICU_EXT_IRQ_SINGLE_INTERRUPT to the NVIC ID, so it would be something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sys_enableIsrSource(9, 0x70);&lt;BR /&gt;sys_registerIsrHandler(9,(uint32)&amp;amp;ICU_EXT_IRQ_SINGLE_INTERRUPT);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, please make sure the option for Port Interrupt is enabled in IcuHwInterruptConfigList:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ICU_PORT_S32k118.JPG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/106684i03E18C6BE450775A/image-size/large?v=v2&amp;amp;px=999" role="button" title="ICU_PORT_S32k118.JPG" alt="ICU_PORT_S32k118.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2020 04:10:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K118-MCAL-GPIO-interrupt/m-p/1073132#M7400</guid>
      <dc:creator>namnguyenviet</dc:creator>
      <dc:date>2020-05-18T04:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: S32K118 MCAL GPIO interrupt</title>
      <link>https://community.nxp.com/t5/S32K/S32K118-MCAL-GPIO-interrupt/m-p/1073133#M7401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for the reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2020 08:54:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K118-MCAL-GPIO-interrupt/m-p/1073133#M7401</guid>
      <dc:creator>talha_uyar</dc:creator>
      <dc:date>2020-05-20T08:54:02Z</dc:date>
    </item>
  </channel>
</rss>

