This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how many registers are pushed into the stack when running an ISR ?

I want to change the return address in the stack when running an ISR so that it returns to the specified address. But i found the compiler also pushes some variables to the stack. How can I configure the complier so that it only pushes all registers to the stack when it complies an ISR?

thank you for your kindly help!!

Parents
  • This is actually one of the few cases where manually changing the return address might be necessary.

    Agreed.

    You really should consider writing this portion in assembler. You will then be in total control, the execution order and size of the code will them be more predictable, and you should (therefore) have a more reliable solution.

    Have you considered freeRTOS?

Reply
  • This is actually one of the few cases where manually changing the return address might be necessary.

    Agreed.

    You really should consider writing this portion in assembler. You will then be in total control, the execution order and size of the code will them be more predictable, and you should (therefore) have a more reliable solution.

    Have you considered freeRTOS?

Children