问题
If I have a fast interrupt handler (by adding __attribute__((interrupt("FIQ")))
), can I invoke other non-fast-interrupt function inside the handler? For example,
void f() {//...}
void g() {//...}
void handler() __attribute__((interrupt("FIQ"))) {
// ...
f();
g();
// ...
}
I have a fast interrupt handler set up similarly as the example above and it's not working as intended. I used gdb to trace through the handler and I found that things are pushed to the stack during the f
function call and are never popped out (similar for g
). Then at the epilogue of the handler, the link register popped from the stack is wrong.
来源:https://stackoverflow.com/questions/60033340/can-a-fast-interrupt-handler-call-a-non-fast-interrupt-handler-function