Can a fast interrupt handler call a non-fast-interrupt-handler function?

こ雲淡風輕ζ 提交于 2021-02-08 09:51:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!