Author Topic: ICP and LPC922  (Read 4357 times)

microjoe

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
ICP and LPC922
« on: October 04, 2005, 01:30:01 pm »
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

  • Guest
Re: ICP and LPC922
« Reply #1 on: October 05, 2005, 05:34:31 am »
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

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: ICP and LPC922
« Reply #2 on: October 05, 2005, 02:49:00 pm »
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

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: ICP and LPC922
« Reply #3 on: October 10, 2005, 10:31:54 am »
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

  • Guest
Re: ICP and LPC922
« Reply #4 on: October 10, 2005, 10:47:32 am »
"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

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: ICP and LPC922
« Reply #5 on: October 10, 2005, 01:14:33 pm »
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

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: ICP and LPC922
« Reply #6 on: October 10, 2005, 01:18:00 pm »
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

  • Guest
Re: ICP and LPC922
« Reply #7 on: October 11, 2005, 05:15:14 am »
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