[En-Nut-Discussion] Problem with GpioIrqEnable

zonedar sholder at summitsemi.com
Thu Mar 1 22:46:08 CET 2012


Klaus,

  I think I fixed it.  You were correct in that as soon as I enabled the
interrupt the IRQ function was being called.  Turns out that the problem was
there.  

I had  my IRQ function set up as follows:

volatile HANDLE *DSP_Content;

static void DSP_Irq(void *arg)
{
    NutEventPost(DSP_Content);   
}

I changed it to:

volatile HANDLE DSP_Content;
static void DSP_Irq(void *arg)
{
	NutEventPostFromIrq(&DSP_Content);
}

...And that fixed it.  

Not sure if the interrupts are correct, but at least it's not hanging up.
:-D

Thanks for your help.  I was very useful!

-Steve





Klaus Kloos wrote:
> 
> Hello Steve
>> 
>> 
>>  It's pointing to PioCtlA (see my previous post).
>> 
> Sorry, ive missed that.
> So your IRQ-Handler is PioCtlA, which is enabling the IRQ.... is that
> right, and is it the way you want it to be? Looks strange to me.
> At the beginning of PioCtlA the IRQ is disabled. When the IRQ is enabled,
> the IRQ-function might be called directly (im not sure about that) leading
> to a new call to PioCtlA, ... and again.....  until the stack is gone.
> You will get more information setting a breakpoint at the start of
> PioCtlA.
> 
> Some weeks ago ive asked a similar questions about external IRQs. May be
> the answer helps you too.
> http://permalink.gmane.org/gmane.comp.hardware.microcontrollers.ethernut/12534
> 
> Greetings Klaus
>>  In that function it is hanging up at:
>> 
>>    outr(PIOA_IER, _BV(bit));  //NOT returning from here
>> 
>>  Also in the previous post.
>> 
>>  Thanks!
>> 
>> 
>> 
>> 
> 
> 
> 
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
> 
> 

-- 
View this message in context: http://old.nabble.com/Problem-with-GpioIrqEnable-tp33422809p33424609.html
Sent from the MicroControllers - Ethernut mailing list archive at Nabble.com.




More information about the En-Nut-Discussion mailing list