Hi,
I have two threads interrupt and main thread. currently, i'm using NOOVERLAY. In order to save space in the RAM, i want to overlay data between functions, BUT I want that the interrupt will not overlay with the main thread.
How can i do it? i'm using a KEIL of 8051 Uvision.
example: void interrup (void); ..... void main (void); .....
Off course you are right that what I thought, however I tried it and some data was corrupted by the interrupt since it used the same space for different variables.
Are you, by any chance, calling any functions from the interrupt function that you are also calling from your main code ?
No, i never use the same function from interrupt and main thread
Thanks,
Another question: What is the purpose of taking the address of the ISR and casting it to a char pointer ?
How can i do it otherwise?
Ariel
What are you trying to achieve by it?
It seems an entirely pointless exercise!
do what?
Erik
Ariel, please explain what you meant with this code:
ptr2isr = (char *) isr;
what are you trying to do here?