Flash Magic Forum

Archive => Old Topics => Topic started by: Juan Carlos on November 10, 2004, 09:49:20 am

Title: ISP Application Note for the LPC932
Post by: Juan Carlos on November 10, 2004, 09:49:20 am
Hi, I am trying to find out if the application note (AN10221) written to program divices like the LPC932 would work for the LPC932A1 (TSSOP). I need to change the program on the chip, but is already in-circuit (soldered)...TXD and RXD external connections are already made.

Now, can anyone give me an idea on how to program the LPC936? The PAB900 board does not support it.

Thanks!

J.C.
Title: Re: ISP Application Note for the LPC932
Post by: Andy Ayre on November 10, 2004, 11:24:38 am
The ISP protocol is the same for all LPC9xx devices that support it. You will need to solder a header onto the board, maybe with flying leads. You might have to cut some tracks to allow the power supply to be controlled by Flash Magic, etc. See the Flash Magic application note on Hardware ISP entry using the handshaking signals.

If the LPC936 supports ICP then read the Philips ICP application note to understand how it works. It's pretty strightforward and I bet you can modify the PAB900 or build your own simple circuit to work with it.

Title: Re: ISP Application Note for the LPC932
Post by: erikm on November 10, 2004, 12:17:12 pm
>>You will need to solder a header onto the board, maybe with flying leads. You might have to cut some tracks to allow the power supply to be controlled by Flash Magic, etc<<

I was under the impression that was only needed for the 932 (non -a1).

Oh well, there is a NoTouch for the 932 which will work.  One question re that, will FlashMagic work if you take a virgin chip (already in ISP mode) and do not fiddle with power, reset etc?  The same will, of course apply to a chip that is "NoTouched" to ISP mode.

I will, pretty soon, start on LPC projects that are not on the Keil board and can, of course, experiment at that time, but it would be nice to know.

Erik
Title: Re: ISP Application Note for the LPC932
Post by: Andy Ayre on November 10, 2004, 12:21:03 pm
I believe that all Philips ISP enabled devices come from the factory with the status bit/byte set, so a power up should be the only thing needed before sending the 'U' to autobaud.

Title: Re: ISP Application Note for the LPC932
Post by: Juan Carlos on November 12, 2004, 07:27:31 am
Andrew Ayre Said:
====================================================
If the LPC936 supports ICP then read the Philips ICP application note to understand how it works. It's pretty strightforward and I bet you can modify the PAB900 or build your own simple circuit to work with it.
===============================================

You were right, I modified the connections on the PAB900 and follow intructions in the ICp application note and it worked...

Thank you very much!

J.C.
Title: Re: ISP Application Note for the LPC932
Post by: Juan Carlos on November 18, 2004, 12:08:10 pm
J.C. said:
==============================================
You were right, I modified the connections on the PAB900 and follow intructions in the ICp application note and it worked...
==============================================

Andrew I am trying to program the LPC936 with a large program (12.5Kbytes), but it does not work at all. The micro gets programmed, but the Cyclic redundancy check does not match and when I try to run the micro, it does not do anything. My previous comment is still valid, but with an LCD program that I have (3.4kbytes)...the micro configures and displays on the LCD. What do you think could be wrong with the larger program?

thanks!

J.C.
Title: Re: ISP Application Note for the LPC932
Post by: Andy Ayre on November 18, 2004, 01:33:04 pm
I don't know. I haven't personally used the LPC936 yet. If you program the smaller hex file in does it still work after programming the larger hex file?

Every time you program the larger hex file do you get the same results for the CRCs, or does it keep changing?

I would try removing parts of the application and reducing the size until it starts working. Maybe one of the flash blocks is faulty.

Title: Re: ISP Application Note for the LPC932
Post by: Graham on November 18, 2004, 01:48:14 pm
Hi Juan,

The 936 has 128-byte pages instead of 64-byte (and therefore 2k sectors) which allows it to have the full 16k possible in the LPC9xx family.

However, if you program it as a 935 then I think you will only ever program half of it.

Has your vendor upgraded their programming software to support the 936 algorithm?

Graham
support at acqura dot com
Title: Re: ISP Application Note for the LPC932
Post by: Juan Carlos on November 19, 2004, 05:16:08 am
Andrew Ayre siad:
===================================================
I would try removing parts of the application and reducing the size until it starts working. Maybe one of the flash blocks is faulty.
===================================================
I think you are right Andrew. Accidently I have modified the block sectors by selecting them through flash magic before programming. According to flash magic I modified them in a way that once they are program they cannot be reprogram through ISP, only with a serial programer...so I think I messed up the micro, but I am not too sure if it is still useful...do you know what I am saying? Makes sense? If not please correct me.
So, to solve this problem I put a new micro and program it as usual...ICP. I checked the Cyclic redundancy check and it matched...I run it and it worked. Could I reprogram the micro? I am afraid running into the same problem again, but I have to modify my program...
Please respond.


 Graham said:
==================================================
Has your vendor upgraded their programming software to support the 936 algorithm?
==================================================
I have bought the professional kit (debugger, programmer) from Keil software, which allows me to program and debug large programs. However, I am still using the , but they said it should not matter.


Thanks Guys.
Title: Re: ISP Application Note for the LPC932
Post by: Andy Ayre on November 19, 2004, 06:21:59 am
Are you saying that you set security bit 2 for one of the flash blocks? If that is the case then you will need a parallel programmer to erase the bit. Flash Magic warns you about this before programming any security bit 2.

Or did you uncheck the "protect isp" option? If you did that then you will need a parallel programmer and try to find a copy of the bootloader somewhere.

As long as you didn't set security bit 2 and you didn't uncheck "protect isp" then it should be possible to reprogram the device.

Title: Re: ISP Application Note for the LPC932
Post by: Juan Carlos on November 19, 2004, 06:49:32 am
Andrew, I did not set anything. Every time I opened flash magic, security bits 0 and 1 from blocks 1 and 2 are always checked (set). It just happened again...I reprogrammed the chip with those bits set and it does not work. Are those bits supposed to be set?
Please respond soon.

Protect IPS option is always checked (set). I think I need to look at those bits before programming everytime I opened flash magic.

Thanks!
Title: Re: ISP Application Note for the LPC932
Post by: Andy Ayre on November 19, 2004, 06:52:04 am
If you open Flash Magic and security bits 0 and 1 are checked, then that is because they are set in the device.

Do they become unset if you perform a full device erase?

Title: Re: ISP Application Note for the LPC932
Post by: Juan Carlos on November 19, 2004, 07:21:50 am
Do they become unset if you perform a full device erase?

=====================================
No, Andrew they stayed the same. But after doing a full device erase, I reprogrammed the chip and it "looks" like it is fine. The redundancy check is good. I will try it several times and let you know.

thanks
Title: Re: ISP Application Note for the LPC932
Post by: Andy Ayre on November 19, 2004, 07:25:47 am
Try unchecking the security bit checkboxes and then performing a full device erase. Hopefully the security bit checkboxes should remain unchecked.

Title: Re: ISP Application Note for the LPC932
Post by: Juan Carlos on November 19, 2004, 07:58:00 am
It just happened again. I tried to reprogram the chip for the 3rd time and it did not work. Another chip wasted and I am running out...I think I got only two left.

I will try your suggestion here:
Try unchecking the security bit checkboxes and then performing a full device erase. Hopefully the security bit checkboxes should remain unchecked.
Title: Re: ISP Application Note for the LPC932
Post by: Juan Carlos on November 19, 2004, 10:47:17 am
Andrew, nothing works. How can I implement this serial programer? With TXD and RXD? Is there any app. note or something like that?

Thanks
Title: Re: ISP Application Note for the LPC932
Post by: Andy Ayre on November 21, 2004, 08:56:50 am
If you are not setting any security bit 2's of the flash blocks, then ISP mode should continue to work. You are selecting the correct device, right? You must not select LPC932 if you are using LPC935 and vice versa.

For more information on ISP refer to Philips application note AN461, available on www.philipsmcu.com.

For a device new from the factory the security bits should not be set, so it is puzzling to me why they should be set for you.

Title: Re: ISP Application Note for the LPC932
Post by: Juan Carlos on November 22, 2004, 06:20:47 am
Andrew I do not set anything. Every time I put a new chip and read its device signature those security bits are already set. This is one of the reasons why I prefer woriking with PLCC packages.
Andrew I got this message from an engineer from Philips...he knows the problem I am having...
Does this make sense to you?

He said:
"You would have to have a way to contact the RXD, TXD, and Reset pins on the 936. You could then jumper these to the RXD, TXD, and Reset pins on the MCB900 so you could use the RS-232 translator that is on there (but remove the PLCC 932 device). Then Flash Magic would connect to the DB-9 connector on the MCB900."

Will it work?

Thanks!
Title: Re: ISP Application Note for the LPC932
Post by: Andy Ayre on November 22, 2004, 06:57:26 am
What they are describing is how to connect the device to your PC. Are you using the MCB900? If so then you just need to put the jumper into the RESET position and connect the MCB900 to your PC using a standard serial cable.

Title: Re: ISP Application Note for the LPC932
Post by: Juan Carlos on November 22, 2004, 07:40:30 am
Andrew, Yes I am using the MCB900. My question is this:

Connect:
TXD from LPC936 to TXD of MCB900
RXD from LPC936 to RXD of MCB900
Rst from  LPC936 to Rst of  MCB900

Is this the right way to do it?
Is this implementing serial programming?
Will let me reprogram the LPC936?

Thanks!
Title: Re: ISP Application Note for the LPC932
Post by: Andy Ayre on November 22, 2004, 02:19:34 pm
I am confused. Why not put it in the PLCC socket?

Title: Re: ISP Application Note for the LPC932
Post by: Juan Carlos on November 23, 2004, 05:27:30 am
Andrew Said:
I am confused. Why not put it in the PLCC socket?

The micro LPC936 comes only in TSSOP packages...and I need to find a way to program it serially. As far as I know they do not intent in producing PLCC packages for this derivative.
Can you help with my previous post?

Title: Re: ISP Application Note for the LPC932
Post by: Andy Ayre on November 23, 2004, 06:17:26 am
OK, that makes more sense. So you need to connect some of the pins on the DIL header (or the place where the DIL header goes) to your device. You must connect the device there because you must not bypass the other circuitry on the MCB900 that is needed for ISP. You need:

VDD
VSS
RESET
RXD
TXD

I think that is it.