Hijack an interrupt handler

Post here first, or if you can't find a relevant section!
Post Reply
JimEli
Posts: 20
Joined: Sat Apr 17, 2021 11:33 pm

Hijack an interrupt handler

Post 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?
by fpiSTM » Fri May 21, 2021 4:46 pm
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
Go to full post
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Hijack an interrupt handler

Post 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
dannyf
Posts: 446
Joined: Sat Jul 04, 2020 7:46 pm

Re: Hijack an interrupt handler

Post 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.
Post Reply

Return to “General discussion”