You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Grr <ge...@gmail.com> on 2021/04/21 13:01:55 UTC
STM32 EXTI context
Hello to all.
I was studying EXTI handling in STM32 and noticed irq handlers (as defined
in stm32_exti_gpio.c) have three parameters: irq, context and arg.
And they are never used
If handlers are looked up in the vector table, which only have handler's
address, where do these parameters (specially context) come from?
TIA
Grr
Re: STM32 EXTI context
Posted by Grr <ge...@gmail.com>.
Thank you very much for your explanation. I didn't check irq_attach() in
depth and didn't discover what you mention
I've found
https://cwiki.apache.org/confluence/display/NUTTX/High+Performance%2C+Zero+Latency+Interrupts.
It seems a good start for that subject
El mié, 21 abr 2021 a las 9:30, Nathan Hartman (<ha...@gmail.com>)
escribió:
> On Wed, Apr 21, 2021 at 9:03 AM Grr <ge...@gmail.com> wrote:
> >
> > Hello to all.
> >
> > I was studying EXTI handling in STM32 and noticed irq handlers (as
> defined
> > in stm32_exti_gpio.c) have three parameters: irq, context and arg.
> >
> > And they are never used
> >
> > If handlers are looked up in the vector table, which only have handler's
> > address, where do these parameters (specially context) come from?
> >
> > TIA
> > Grr
>
> Unless you are using Zero Latency Interrupts, ALL interrupt vectors
> point to one interrupt handler. The IRQ handlers you were looking at
> are called from within the single interrupt handler. See
> irq_dispatch() in sched/irq/irq_dispatch.c to see where the 'context'
> parameter comes from.
>
> Cheers,
> Nathan
>
Re: STM32 EXTI context
Posted by Nathan Hartman <ha...@gmail.com>.
On Wed, Apr 21, 2021 at 9:03 AM Grr <ge...@gmail.com> wrote:
>
> Hello to all.
>
> I was studying EXTI handling in STM32 and noticed irq handlers (as defined
> in stm32_exti_gpio.c) have three parameters: irq, context and arg.
>
> And they are never used
>
> If handlers are looked up in the vector table, which only have handler's
> address, where do these parameters (specially context) come from?
>
> TIA
> Grr
Unless you are using Zero Latency Interrupts, ALL interrupt vectors
point to one interrupt handler. The IRQ handlers you were looking at
are called from within the single interrupt handler. See
irq_dispatch() in sched/irq/irq_dispatch.c to see where the 'context'
parameter comes from.
Cheers,
Nathan