<?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>MQX Software SolutionsのトピックRe: GPIO IRQ fails</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181197#M2758</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still no interrupt raised? If you really followed the thread you included, your application should be running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check the result of the call _int_get_isr to verify if your function was tight to the vector number.&lt;/P&gt;&lt;P&gt;Look at the registers of the MCU if PORTS registers are properly set up (GPIO function) and what about Interrupt controller (IMRHn,IMRLn) ?&lt;/P&gt;&lt;P&gt;Does the logic level of the pin really change? Is the pin in logic high (because of pull-up) ?&lt;/P&gt;&lt;P&gt;Silly questions,but they cause a trouble.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 22 Jul 2012 19:11:31 GMT</pubDate>
    <dc:creator>c0170</dc:creator>
    <dc:date>2012-07-22T19:11:31Z</dc:date>
    <item>
      <title>GPIO IRQ fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181192#M2753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to link an IRQ to an extern IRQ pin. I've been reading the manuals and consulting different threads in this forum, but I can't see where the error is. Have I to modify or enable something in the BSP or PSP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code, maybe you know what's happening.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// define inputsconst uint_32 g_GPIOS_Inputs[] = { GPIO_PORT_NQ | GPIO_PIN1 | GPIO_PIN_IRQ_FALLING, GPIO_LIST_END };static MQX_FILE_PTR g_GPIOS_OutputPort = NULL;static MQX_FILE_PTR g_GPIOS_InputPort = NULL;void irq_callback();// current value of output gpiosboolean g_GPIOS_OutputsValue[PROJECT_MAX_OUTPUTS] = {0};void irq_callback(){ static u8 counter=0;  counter++; }/** GPIOS_Init *  Initializes all gpios in the hardware  *  @return Error code */error_t GPIOS_Init(){ // configure gpios outputs g_GPIOS_OutputPort = fopen("gpio:write", (char_ptr)&amp;amp;g_GPIOS_Outputs); if (g_GPIOS_OutputPort == NULL){  PrintError("GPIO Init failed. Exiting...", ERROR_MQX_GPIO);  _time_delay(PROJECT_MQX_DELAY_TO_EXIT);  _mqx_exit((_mqx_uint)ERROR_MQX_GPIO); } // configure gpios inputs g_GPIOS_InputPort = fopen("gpio:read", (char_ptr)&amp;amp;g_GPIOS_Inputs); if (g_GPIOS_InputPort == NULL){  PrintError("GPIO Init failed. Exiting...", ERROR_MQX_GPIO);  _time_delay(PROJECT_MQX_DELAY_TO_EXIT);  _mqx_exit((_mqx_uint)ERROR_MQX_GPIO); }  ioctl(g_GPIOS_InputPort, GPIO_IOCTL_SET_IRQ_FUNCTION, (pointer) &amp;amp;irq_callback); ioctl(g_GPIOS_InputPort, GPIO_IOCTL_ENABLE_IRQ, NULL);  //GPIOS_InstallCallbackIRQ(&amp;amp;MAIN_Callback); //GPIOS_IRQEnable(TRUE);  }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:31:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181192#M2753</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2020-10-29T09:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO IRQ fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181193#M2754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, but I forgot to say I'm working on M52259DEMO using MQ X3.7. Maybe that helps to solve this mistery.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 23:26:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181193#M2754</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2012-07-19T23:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO IRQ fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181194#M2755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ardoster,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There come to my mind in the first place :&lt;/P&gt;&lt;P&gt;I can't locate in your code snippet if you added the ISR to the MQX (int_install_isr() ) ? Did you enable gpio interrupt source? 2 function calls are commented and can't see what's their agenda.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 13:56:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181194#M2755</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2012-07-20T13:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO IRQ fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181195#M2756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The two functions you refer are commented because they call the two ioctl calls written before them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;About the int_install_isr(), that is more interesting. I'm not calling that function. That can be the explanation. But I've been following this &lt;A href="https://community.freescale.com/message/67920#67920" title="https://community.freescale.com/message/67920#67920"&gt;https://community.freescale.com/message/67920#67920&lt;/A&gt;and that function is not being called.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll keep trying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you a lot of&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 14:22:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181195#M2756</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2012-07-20T14:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO IRQ fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181196#M2757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I've been making inquiries and I've seen the function _int_install_isr is being called by fopen when in its pins struct is added the flag *IRQ*, as for example GPIO_PIN_IRQ_FALLING.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've verified this function is being correctly called, but the interruption never happens. I don't know what to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 14:38:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181196#M2757</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2012-07-20T14:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO IRQ fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181197#M2758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still no interrupt raised? If you really followed the thread you included, your application should be running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check the result of the call _int_get_isr to verify if your function was tight to the vector number.&lt;/P&gt;&lt;P&gt;Look at the registers of the MCU if PORTS registers are properly set up (GPIO function) and what about Interrupt controller (IMRHn,IMRLn) ?&lt;/P&gt;&lt;P&gt;Does the logic level of the pin really change? Is the pin in logic high (because of pull-up) ?&lt;/P&gt;&lt;P&gt;Silly questions,but they cause a trouble.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jul 2012 19:11:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181197#M2758</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2012-07-22T19:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO IRQ fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181198#M2759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes. Thanks for your reply. Unfortunately I'm still having problems. I can't understand how a such easy thing can make so much troubles! &lt;IMG alt="Smiley Sad" class="emoticon emoticon-smileysad" id="smileysad" src="https://community.nxp.com/i/smilies/16x16_smiley-sad.png" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using this pinout list...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;const uint_32 g_GPIOS_Inputs[] = {  GPIO_PORT_AN | GPIO_PIN0,  GPIO_PORT_NQ | GPIO_PIN1 | GPIO_PIN_IRQ_FALLING,  GPIO_PORT_NQ | GPIO_PIN7,  GPIO_LIST_END };&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... I've just made the next verifications:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I'm able to read the pin AN0&lt;/P&gt;&lt;P&gt;2) I'm able to read the pin NQ7 (not linked to the interruption).&lt;/P&gt;&lt;P&gt;3) The GPIO NQ registers are correct:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PORTNQ = 0x7E DDRNQ = 0x00 (all pins configured as inputs)SETNQ = 0xAACLRNQ = 0x00PNQPAR = 0x880 (pins 1 and 7 configured as GPIO function)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;4) IMRL0 is correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;IMRL0 = 0x667bdffc(bit 1 is 0, so the interrupt source number 1 (EPORT1) is enabled)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;5) Using &lt;STRONG&gt;_int_get_isr(MCF5225_INT_EPORT0_EPF1)&lt;/STRONG&gt; I obtain the ISR function address. This pointer is addressing to gpio_eport_irq(), in file io_gpio_mcf5225.c. So it is correct. In this function, examining the code, is where MQX must locate my ISR function. But this interruption never happens.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;6) The only thing is strange is i CAN'T read the value of pin NQ1 when this pin is linked to the falling interrupt (GPIO_PIN_IRQ_FALLING). In other words: I have a task reading every second the value of pin NQ1, and I can see how this value changes (so the HW is correct) when this pin is NOT linked to the falling edge interrupt. But when I link this pin to the interrupt, the value printed by my task is always 0. &lt;SPAN class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;&lt;LI-EMOJI id="lia_face-with-open-mouth" title=":face_with_open_mouth:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you think? I need holidays!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:31:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181198#M2759</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2020-10-29T09:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO IRQ fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181199#M2760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've solved the problem. It was something related with hardware. I don't understand very well what the problem was, but now is working correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because it was a problem on my side, could some admin delete this thread??? Is a nonsense having this thread when the problem was nothing related to MQX or Coldfire.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and sorry&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2012 22:47:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181199#M2760</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2012-07-25T22:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO IRQ fails</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181200#M2761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been wrong these last two weeks. It's not a hardware related problem, but a software problem. The problem is that I must initializalize the rtcs module before initializing the gpios interruptions. Doing this, the problem dissapear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any explanation about this problem????&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 15:13:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/GPIO-IRQ-fails/m-p/181200#M2761</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2012-08-08T15:13:22Z</dc:date>
    </item>
  </channel>
</rss>

