Flash Magic Forum

In-System Programming Support => LPC9xx/LPC9xxx => Topic started by: finesseprecision on August 29, 2008, 01:49:00 am

Title: LPC936 Unable to enter ISP, confused about bootvec and bootstat
Post by: finesseprecision on August 29, 2008, 01:49:00 am
Hi everyone,

Please help:

I have several 89LPC936 with similar problems, namely, when I tried programming ICP (via EMP900 & PAB900), I get Sector 7 write error if I try to write into ISP area.

I included LPC_ISP_16K_V03.a51 in my compilation and set erase sectors 0 to 7.

Even when I managed to program, I was only able to read signature via ISP but when I tried programming via ISP and follow it by a read signature, it fails (even after start bootloader invoked).

I read on line that although 0x3F is used as bootvec and bootstat is set as 0x01,  the notouch examples set the boot vector to be 0x1f00. Reading the LPC936 spec pg. 24 Fig 8 suggests that ISP code is at 1FFFh.

What should I do to get ISP working. ???

Thanks
Regards
Title: Re: LPC936 Unable to enter ISP, confused about bootvec and bootstat
Post by: Andy Ayre on August 29, 2008, 08:44:13 am
In the LPC936 the bootloader occupies the range 0x3F00 to 0x3FFF. Therefore the bootvector is 0x3F which means that the entry point for the bootloader is 0x3F00.

The notouch code is an example. Not all the LPC9xx devices have the same amount of memory and therefore the same location for the bootloader. You will need to modify it for your device.

If you have tried to write to block 7 while in ICP mode you may have corrupted the bootloader. That would stop it from working later on in ISP mode. You can't write to block 7 while using ISP because you are attempting to erase and overwrite the section of memory that the device is executing from. Therefore you cannot include the bootloader file in your project if you are using ISP.

It shouldn't have been necessary to attempt to program the bootloader into the device using ICP or ISP and it means we don't know what state your device is now in. ICP should always be possible however.

I recommend either getting a parallel programmer to program the bootloader and check the value of the bootvector, or purchase a complete ICP interface from Future Designs.

Andy
Title: Re: LPC936 Unable to enter ISP, confused about bootvec and bootstat
Post by: finesseprecision on August 30, 2008, 10:12:43 am
Hi,

Thanks for the prompt reply. Just to confirm. Is the combination of EMP900, PAB900 and keil microvision not able to reprogram a working copy of the isp bootloader? If so, would the parallel programmer be necessary or is it possible to use my existing system?
I set keil to lpc936, erase sectors 0 to 7, unchecked 'protect isp', unchecked 'take setting from .a51' and set bootvec to 3f, bootstat to 00.
The lpc was working in isp in my application circuit programmed via Future tec's FT232R (USB serial port), right up to when I tried to send via rs232 in a CCU interrupt and programmed it via isp/flash magic.

Thanks
Title: Re: LPC936 Unable to enter ISP, confused about bootvec and bootstat
Post by: erikm on September 02, 2008, 06:02:29 am
Thanks for the prompt reply. Just to confirm. Is the combination of EMP900, PAB900 and keil microvision not able to reprogram a working copy of the isp bootloader? If so, would the parallel programmer be necessary or is it possible to use my existing system?

THINK!

how can you install the bootloader with the bootloader once it is blown.

in some cases (I do not know about your chip) it is possible to load a 'substitute bootloader' in code memory with a working bootloader to replace the bootloader, but that, of course, requires that the original bootloader works to install the 'substitute bootloader'

yes, you can program the bootloader with a parallel programmer.

Erik
Title: Re: LPC936 Unable to enter ISP, confused about bootvec and bootstat
Post by: Je Gold on September 02, 2008, 07:26:20 am
My understanding is...  ISP uses the bootloader.....  and ICP  is the same as what a parallel programmer does.....

IE.... ICP is programming down at the lowest level....


If you look carefully  the UART MODE 0  - is very close to what ICP uses as the physical layer to transfer the ICP commands..



Joe
Title: Re: LPC936 Unable to enter ISP, confused about bootvec and bootstat
Post by: Andy Ayre on September 02, 2008, 08:53:56 am
It should be possible to replace the bootloader using ICP, but I've never tried it or know of anyone who tried it. However when using ICP the full memory range of the device should be accessible in Flash Magic, including the topmost block.

USB to RS232 cables can cause a lot of problems. Our recommendation would be to get a PCI or PCMCIA card with real COM ports.

Andy
Title: Re: LPC936 Unable to enter ISP, confused about bootvec and bootstat
Post by: finesseprecision on September 03, 2008, 01:05:01 am
Thanks to all for the insightful reply.

Just to confirm, ISP uses bootloader so of course it cannot correct the problem.
ICP and parallel may be used as it does low level hardware write that is independent of bootloader.
So far, I have only come across ISP,ICP,IAP programming in the datasheet for LPC936, please advise how I could go about parallel programming.

Would the USB ICP programmer (the $69 one) from Future Tec Inc be able to reprogram a working copy of the ISP bootloader?

Again, thanks
Title: Re: LPC936 Unable to enter ISP, confused about bootvec and bootstat
Post by: Andy Ayre on September 03, 2008, 08:38:51 am
NXP doesn't release the details of parallel programming. You will need to buy a commercial programmer from a company like BP Microsystems, etc.

We've never seen or tried the Future Tec programmer. You might be better off contacting them for technical questions.

Andy