P89LPC922, OTP?

Started by Jimmy, November 15, 2005, 08:34:42 AM

Previous topic - Next topic

Jimmy

Hi all,

I am a new user of the Philips 8051 MCU family and I am evaluating the P89LPC922 (DIP20 version). I am evaluating this device without starter kit.  I am using uVision2 from Keil and I have inserted two files in project: LPC_ISP_8K_V02.a51 and Start900.a51

I am also experiencing the same problem. Before writing my code to the device, I could make  a blank check, read the device signature.

After downloading my first program to the device, I am no longer able to do anything.  Each time that "Flash Magic" tries to contact the device, I always got the same message : "Unable to connect.... Reset the hardware in ISP mode again".

I seems that the IPS mode is lost forever.

Is there something wrong?

Thanks so much for your help

Jimmy

Andy Ayre

How did you configure the device in Start900.a51?
Did the programming complete successfully or did you get any errors?

There is no need to include the bootloader source in ISP projects. I'm not sure what the effect will be if the bootloader tries to reprogram itself.

Embedded Systems Academy, Inc.
support at esacademy dot com

Jimmy

Hi Andy,

Start900.a51 was not configured by myself, it has been created by uVision 2 of the Keil c compiler. Since I have no knowledge with assembly, I have no idea what if the effect of the this file and I just leave it unchanged.

Do you have any idea how to reprogram the device with Flash Magic via RS232?

Thanks.

Jimmy

Andy Ayre

Unfortunately you have to check everything, because what may be an acceptable default for one project, is not for another. Open start900.a51 in a text editor (or uVision2) and read it - it is very well commented. Consider how each setting may affect your hardware/code. Read the user manual for more information on each feature if you are unsure what it does.

Which ISP entry method are you using? Break detect, pulses or something else?

To answer your last question - yes, but I don't know what is wrong with your particular hardware/device. I don't have enough information yet. If I knew the solution I wouldn't ask lots of questions. ;)

Embedded Systems Academy, Inc.
support at esacademy dot com

Jimmy

Dear Andy,

Thanks for a so quick reply.

I just use a testing board (max 232 and the device) to evaluate this device.
The configuration is at minimum (no external crystal) and I just use a switch to generate manually (with a big capacitor between reset and GND to cut undesired noises) three pulses to the reset signal after powing up the device.


I downloaded the flash magic utilities and I let it all by default except removing DTR and RTS are disabled. But "Protect ISP code" is enabled.

I just selected the baud rate to 7200 Bauds to follow the recommandation of the Flash Magic utility.

Is there any other configuration to be done?

Thanks so much,

Jimmy

Andy Ayre

By programming the device with start900.a51, you may have reconfigured the device to use an external crystal or clock with a certain frequency range. If that is the case and none is attached, then the device is not executing anything. Check the file to find out.

The pulses have very strict timing requirements. I am skeptical that manually operating a switch will produce signals that meet the timing requirements. Check with a scope to find out.

You were able to program it once because from the factory the device powers up into ISP mode. Now it has been programmed you are testing the ISP entry method for the first time.

Embedded Systems Academy, Inc.
support at esacademy dot com

Jimmy

Dear Andy,

Thanks for your valuable inputs. It suddenly becomes much more clear now.

Even if I am not expert in assembly programming, I see that "FOSC EQU 3" in the start900.a51.   It means that the device is using the internal RC oscillator and I suppose that it is same as the factory setting.

Regarding the pulse timing issue, I can generate very precise pulses with another microcontroller.  Could you kindly tell me what should be the exact timming to generate these three pulses?  Or could you give me the links allowing me to find such information?

Best Regards,

Jimmy

Andy Ayre

The timing requirements for the pulses are described in the user manual for the device, which you can download from the Philips website.

Embedded Systems Academy, Inc.
support at esacademy dot com

Andy Ayre

Note that if you duplicate the circuit from a Keil MCB900 (or better still buy one - they are very cheap), then Flash Magic can generate the pulses for you.

A link to the Keil MCB900 schematic is available on the Flash Magic web page.

Embedded Systems Academy, Inc.
support at esacademy dot com

Jimmy

Dear Andy,

Thanks for your valuable inputs.

Best Regards,

Jimmy

vital4all

Hello Andy,

I have got some LPC922FN-CC3887 in DIP. I got them from local a supplier.
These have same behaviour. They program only once in ISP mode, whatever simple and smallest TEST code I write!

So I decided to try ICP method. On MCB900 with LPC932 in socket , I loaded ISP-ISP bridge (v16).  With ckt given (with slight modification) all of them worked for multiple programming; even those I doubted will never be usable again!

I made one change in Vdd ckt. Instead of single npn, I used npn-pnp pair in Vdd ckt to get better Vdd for target CPU.

With warm regrds,
Hitesh


Andy Ayre

I can't recall offhand if you can do this with ICP, but check the values for the boot vector and status bit. Make sure the boot vector is set to the factory default and the status bit is set. Then see if you can get the device into ISP mode again.

Embedded Systems Academy, Inc.
support at esacademy dot com