Hi,
On my MSP430FR5969, I've written a code where, an interrupt is triggered when a key is pressed.
However, as per my needs, I want that after every interrupt(ISR) segment execution, I want a specific function to be executed.
One way to do so would be calling the function in ISR. However since the function is large enough, that isn't a thing I want to do.
I've discovered that another way to do so would be modifying the return address. Can someone point me out, how to achieve so?
Is there some other way to achieve my task?
I can't use a set-a-flag-in-isr based thing. The function needs to be called immediately after ISR execution. The code should forget everything, and do the special function.
An example:
ISR Segment { //Execution of ISR //Sets some value to flag variable. } void Special_Emergency_Func() { //This is a large function to be executed on priority on every time ISR is executed } void main(void) { //init MSP430 modules while(1) { if(flag == x) { //execute this large part //these segments are quite big. //It takes a lot of time before code checks for flag value once again, after interrupt. } else if(flag == y) { //execute this large part //these segments are quite big. //It takes a lot of time before code checks for flag value once again, after interrupt. } } }