ISP Application Note for the LPC932

Started by Juan Carlos, November 10, 2004, 09:49:20 AM

Previous topic - Next topic

Juan Carlos

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.

Andy Ayre

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.

Embedded Systems Academy, Inc.
support at esacademy dot com

erikm

>>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

Andy Ayre

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.

Embedded Systems Academy, Inc.
support at esacademy dot com

Juan Carlos

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.

Juan Carlos

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.

Andy Ayre

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.

Embedded Systems Academy, Inc.
support at esacademy dot com

Graham

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

Juan Carlos

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.

Andy Ayre

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.

Embedded Systems Academy, Inc.
support at esacademy dot com

Juan Carlos

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!

Andy Ayre

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?

Embedded Systems Academy, Inc.
support at esacademy dot com

Juan Carlos

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

Andy Ayre

Try unchecking the security bit checkboxes and then performing a full device erase. Hopefully the security bit checkboxes should remain unchecked.

Embedded Systems Academy, Inc.
support at esacademy dot com

Juan Carlos

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.