Daniel Morley

HCS08 - Illegal BP

Discussion created by Daniel Morley on Dec 13, 2006
Latest reply on Dec 15, 2006 by Alban Rampon
I am trying to program a HC9SO8 chip with a C compiler
I add a while state and the device works for one pass only. The debugger tells me ILLegal BP and ends code.
I power down device and the code runs fine.

void main(void) {    int x; EnableInterrupts; /* enable interrupts */                 Initialize();  ConfigurePorts();    x=1;  while (x=1){     x=1;  if (Button1==DOWN){     Reverse();  }    } for(;;) {   __RESET_WATCHDOG(); /* feeds the dog */ } /* loop forever */ /* please make sure that you never leave main */}

(Alban: moved post from 16-bit; clear title; format code using SRC button)

Message Edited by Alban on 2006-12-12 11:26 PM