I'm using SDCC compiler.
What I'm trying to achieve is to reconfigure Timer0 in Mode 2 auto-reload, during its own interrupt handler. Here is the C code:
void reconf(void) __interrupt(1){
TR0=0;
TH0=0xC0;
TL0=0xC0;
TR0=1;
}
Here are the questions:
Is it possible to reconfigure TL0 and TH0 for Timer0 in Mode 2 auto-reload mode during its own interrupt handler execution?
Is it necessary to stop the Timer0 during reconfiguration or not because it is not running during the interruption?
Are the TH0 and TL0 values PUSHed into the stack before the interrupt routine starts? If these values are PUSHed into the stack, and then during the routine handler execution I reconfigure these values, will these values be overridden by the POPed values from the stack upon exiting from interrupt?