cancel
Showing results for 
Search instead for 
Did you mean: 

Halt mode exit

lseletron
Associate II
Posted on September 25, 2007 at 23:16

Halt mode exit

1 REPLY 1
lseletron
Associate II
Posted on September 25, 2007 at 23:16

Hi,

I am using 72F264G2 with an 8MHz crystal. I have the following code:

int main(void)

{

DisableInterrupts;

SetBit(PADDR,7); // Test output bit

SetBit(MISCR1,4); // set input sensitivity

SetBit(MISCR1,3);

ClearBit(PCDDR,3);

SetBit(PCOR,3); // set pull-up input to generate interrupt

EnableInterrupts;

while (1)

{

Halt;

}

}

@interrupt void Ei0Interrupt(void)

{

PA7=PC3;

return;

}

The CPU is fed a square signal on PC3 from a function generator. The Interrupt routine then copies the input signal to another pin (PA7) and both signal are observed on the oscilloscope. I observe a delay of about 1 milisecond. I guess this is what it takes the CPU to go from HALT to RUN, but it seems to me a bit long.

Am I correct? I read somewhere on the forum that it takes 256 cycles to go from HALT to RUN mode

Thanks