LPC935 automatically goes to ISP

Started by Christophe H., August 30, 2006, 05:01:18 AM

Previous topic - Next topic

Christophe H.

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

erikm

it must be yout 'NoTouch trigger' that get activated accidentially.

post the code for the trigger

Erik

erik

Christophe H.

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

erikm

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

erik

Christophe H.

Hello Erik,

I was already afraid of such a thing.

thanks for your advice

Christophe