Page 1 of 1

Hijack an interrupt handler

Posted: Fri May 21, 2021 4:09 pm
by JimEli
I'm using the official STM core. I’m not sure, but the attachInterrupt functionality appears to use all of the GPIO EXTI interrupt handlers. Is there a method to disable this functionality so I can use an EXTI handler?

Re: Hijack an interrupt handler

Posted: Fri May 21, 2021 4:46 pm
by fpiSTM
Yes you can by defining in a file named hal_conf_extra.h at sketch level:

Code: Select all

#define HAL_EXTI_MODULE_DISABLED
https://github.com/stm32duino/wiki/wiki ... definition

Re: Hijack an interrupt handler

Posted: Sun May 23, 2021 11:01 pm
by dannyf
a few solutions:

1. you can chain function pointers to your own isr - the cleanest solution;
2. if you have access to t he source code, you can do anything;
3. if your compiler allows "weak" attribute, you can try that as well.