Peg, try it
here and
hereI understand that RESET and BKGD pin is shared, it means it can be used also as general I/O pin or whatever function belongs to it. But I think it's default state after reset can be changed in SOPT1 register and I don't change this register. And more, it's only RAM register, written by user firmware after entering normal execution mode, and not in BDM mode.
Maybe I'm wrong in my assumptions so please correct me.
How could I prevent QG8 from entering BDM mode?
My code looks like this, but I don't think there could be something wrong.
void main(void) {
PTADD_PTADD0=1;
for(;

{
PTAD_PTAD0=~PTAD_PTAD0;
WaitNms(200);
}
}
Function WaitNms() just waits a number of millisecons.