Flash Magic Forum

In-System Programming Support => LPC9xx/LPC9xxx => Topic started by: Christophe H. on August 30, 2006, 05:01:18 AM

Title: LPC935 automatically goes to ISP
Post by: Christophe H. on August 30, 2006, 05:01:18 AM
Hello,

I added notouch to my lpc935 and all work fine except....
some of my boards are going automatically to isp mode .

This doesn't happen all the time some boards keep on working for days (several on/off cycles) and than suddenly they stop working -> when I connect a uart  + use flashmagic I'm able to read the ID and reprogram the device.

any advice?

Thanks
Title: Re: LPC935 automatically goes to ISP
Post by: erikm on August 30, 2006, 06:06:57 AM
it must be yout 'NoTouch trigger' that get activated accidentially.

post the code for the trigger

Erik

Title: Re: LPC935 automatically goes to ISP
Post by: Christophe H. on August 30, 2006, 06:41:47 AM
if (received_char  == 'x')
 {
  uart_transmit("." );                                    // echo '.' to show that bootmode is on
  no_touch935();
 }


so no_touch is triggered by a uart character (it will become 'boot' in the future but is 'x' at this moment)

during operation no uart is connected

no_touch code :

_noregaddr extern void no_touch935(void)   
{

#pragma asm   

$NOMOD51

NAME NOTOUCH935

PGM_MTP    EQU      0FF03H

no_touch935:

push IEN0
CLR 0AFH
mov R0, #0FFH
mov @R0,#96H
mov A,#02
mov R5,#01
mov R7, #03

lcall PGM_MTP
pop IEN0
RET


#pragma endasm   
}






best regards

Christophe
Title: Re: LPC935 automatically goes to ISP
Post by: erikm on August 30, 2006, 10:12:02 AM
so no_touch is triggered by a uart character (it will become 'boot' in the future but is 'x' at this moment)


That is your problem, the UART often read a garbage character during power up.  Change the request to 4 or more sequential characters and it will work.

Erik

Title: Re: LPC935 automatically goes to ISP
Post by: Christophe H. on August 30, 2006, 10:42:48 AM
Hello Erik,

I was already afraid of such a thing.

thanks for your advice

Christophe