ICP and LPC922

Started by microjoe, October 04, 2005, 01:30:01 PM

Previous topic - Next topic

microjoe

Hi Guys,
I need some help.

I am now totally cofused.

I have 3 application boards with a LPC922. This is intended to be programmed through ICP. I have a header that isolates the lines as suggested in the application note.

I have a MCB900 V4 modified as per the ICP programming application note. I have change the power cct to use a PNP, NPN and 3V regulator to ensure at least 3V at the processor. Using a NPN transistor on its own was only giving about 2.55V. The cable between the MCB900 and the application board is about 50mm.

Now for the problems

All of the boards enter ICP mode and give back valid chip IDs.

Using Flash magic V 2.4 and prog90x V1.4 I can program all boards but the crcs for all flash blocks do not match the hex file.
When I program them, the config byte is over written and the boot vector comes back as 5B. I can manually write to these and read them back and they are correct then.

Using FlashMagic 2.07 I can program all the boards, except that two boards show the wrong crc for the first flash block and the other two blocks used come back correct. I erase the device completly prior to programming and check the crcs of the erased blocks are zero. I am not filling unused flash.

Also at some point earlier I managed to program all the boards and the application ran.

Having read various threads on the forum it seems that most problems are in getting the processor into ICP mode. I must be entering ICP mode because the device ID can be read back.

What I don't understand is why Flashmagic can program some blocks correctly and some incorrectly; why one version works better than another and why it works on one board and not others.

I would have though that if the ICP interface was ok the programming would be OK after that.

I'm new to the LPC922 so this may be finger trouble but I've spent a day on it already.

Can anyone shed some light on this

Yours hopefully

microjoe.

erikm

to use a PNP, NPN and 3V regulator to ensure at least 3V at the processor
There is NO WAY you are going to get 3V from a 3V regulator followed by a transistor.  even the best selected junction transistor vill have a significant VceSat.

Measuring the voltage is worthless unless you measure it with a scope during programming.  The device uses much more current when programming than when "sitting there"

Erik

microjoe

Hi Erik,

The PNP/NPN pair feed the 3V regulator. I used the NPN driven from the lpc935 to switch on a PNP. This second transistor emmitter is supplied with 10v, the collector feeds the input to a 3V regulator. (I have current limiting resistor in the base circuits). This way as long as the VceSat of the PNP does not exceed about 5V the regulator will produce 3V. I would post a cct but I don't know what form to put it in. It does work, I get a stable (scoped) 3V on the application board during programming. BUT doing this did not resolve the problems.

I have managed to program all three boards eventually by using a combination of FlashMagic 2.07 and 2.4 on each board.

I'll post some more details tommorow about the method used to program the boards.

How many people have had NO problems using ICP on application boards using LPC922? This forum naturally only lists the problems not the successes.


Andy Ayre

I'm not sure what is causing your problems, but we have to work with the current version of Flash Magic.

FM should not be programming the BV to 5BH. The CRCs should match if you are not doing things like generating checksums and filling unused flash, and performing an erase of all the flash memory before programming the hex file. Are you doing that?

Embedded Systems Academy, Inc.
support at esacademy dot com

erikm

"The PNP/NPN pair feed the 3V regulator."
which will totally blow the setup if you operate in the "controlled power on mode"

Erik

microjoe

Hi Andrew,

I do agree that BV should not be going to 5B and also that programming the LPC922 should not overwrite the configuration codes.

I have to reprogram them later this week. I'll record exactly what goes wrong ( and right ) I'll post results then.


Hi Erik,
The MCB900 controls the power to the input of the regulator. I've scoped it and it works. I think if I showed you a cct it would be obvious. I probably haven't explained it well.

Regards
Microjoe


microjoe

Hi Andrew,

I thought I'd add the following to my post.  If I erase the flash I get crc of 0 on all blocks. I don't use checksums and normally ( I can't remember exactly at the moment) it's only the first block that has the wrong check sum.

Regards
Microjoe

erikm

The MCB900 controls the power to the input of the regulator. I've scoped it and it works. I think if I showed you a cct it would be obvious. I probably haven't explained it well.


That should give an AWFUL risetime of Vcc

Erik