Hi,
I would like to retrieve some value from my external interrupt handler. The external interrupt handler goes through different states and I would like to evaluate some value inside the interupt handler from outside the interrupt handler and also from another sourcefile/module.
I use (in the interrupt module): volatile unsigned char myByte;
I use (in the evaluating module): extern volatile unsigned char myByte;
In the module during evaluating of 'myByte' I disable the external interrupt.
But I still do not get the correct value.
Where do I go wrong?
Henk
The following bits of information would be helpful:
1. Source code of ISR and the function that accesses the shared variable. Preferably stripped down to the minimum amount of code necessary to reproduce the behavior you observe.
2. Which value do you expect to "get", and which value do you actually "get" ?
hi.
what you have to do is return value from the interrupt.
i have not book here but code is so.
unsigned char external_interrupt(void) interrupt reentrant 12 using 3 { int my_result; /* do something // my_result = 5; // always fixed here return complex; }
look in manual for more detail.
sorry. i look again and not certain about reentrant situation.
maybe someone help in this?
View all questions in Keil forum