Author Topic: ICP problems on custom board  (Read 20191 times)

Mariano D

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
ICP problems on custom board
« on: March 22, 2007, 06:25:14 am »
Hi All, I'm trying to make my own programmer board, for the LPC932A1, and use it in ICP mode.

The board is very similar to the MCB900 from keil, I make it following all the recomendations that I found on the AN's and this forum.

Up today I'm able to make all the functions in ISP mode (read, write, erase & set device configuration).

When I trying to use it as ICP (with the ISP-ICP bridge device on it) I can only use it for read, blank check, erase, read device ID & set device configuration, but I can't program the device.

Is necesary connect some other pin on the LPC932 that I'm using as bridge. Because if I use the original MCB900 board with this device I'm able to make all the functions on ISP & ICP.

If I didnt undestand wrong, for ICP only need to connect TXD RXD to the bridge device and the five pins to the target.
The circuit for control the target VDD pin on the AN10258 doesnt work properly, Im using a PNP & NPN transistor arrengement that works well.

Someone can advice me?

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: ICP problems on custom board
« Reply #1 on: March 22, 2007, 08:59:59 am »
Put a scope on the ICP signals on both the MCB900 and your board and find the difference. Something must be marginal so it fails during larger transfers.

Did you look at the revised ICP circuit from Joe Gold in the resources section of the Flash Magic web site?

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

Mariano D

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: ICP problems on custom board
« Reply #2 on: March 22, 2007, 09:51:19 am »
Thanks Andy,

yes Im using the Joe circuit to control VDD pin on target.
What Im able to see with scope is that when push program on flashmagic, seems to the part read the device ID of the target, then erase it and when come to program the communication of the two devices stops.

Did you think that may be I have some spike on VDD target pin? Maybe I can use a small capacitor and that pin?



Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: ICP problems on custom board
« Reply #3 on: March 22, 2007, 09:56:52 am »
Generate a debug file as described here and email it to me. My email address is at the bottom of all my posts:

  http://forum.flashmagictool.com/index.php?topic=3272.0

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

Mariano D

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: ICP problems on custom board
« Reply #4 on: March 22, 2007, 10:49:20 am »
Andy, I will do that tomorrow and then get back to you.

Thanks

erikm

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Re: ICP problems on custom board
« Reply #5 on: March 23, 2007, 05:45:37 am »
The board is very similar to the MCB900 ... if I use the original MCB900 board with this device I'm able to make all the functions on ISP & ICP.

could the answer be in the question?

in the = fortunately long gone - days of kitchen table programmers for the non-ISP '51s there was, almost daily a forum therad "why does my programmer not work, I copied xxx".  Invariably those threads ended up with "yes., I substituted ..., but that should not make a difference" and invariably that was the cause.

f you substitute just a transistor, it can be that a difference in the beta give a subtle change in timing and - OOPS - the thing does not work.

let us know what makes it not 'a copy' but 'very similar' and maybe the cause can be found.

Erik
erik

Mariano D

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: ICP problems on custom board
« Reply #6 on: March 26, 2007, 06:26:27 am »
Erik Im attaching a .pdf from my board.

Thanks in advance for your advice.
Mariano

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2160
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: ICP problems on custom board
« Reply #7 on: March 26, 2007, 10:02:08 am »
It looks to me like in a long sequence of characters received from the board via RS232, every once in a while a character is dropped. This results in Flash Magic receiving less data than it expected.

Double-check your circuit between the bridge device and your PC matches the circuit on the MCB900.

If you are using a USB to RS232 cable, try a PC with a real COM port to see if that helps.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

Mariano D

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: ICP problems on custom board
« Reply #8 on: March 27, 2007, 10:44:40 am »
Andy, in my last post I attached my board schematic. Maybe if have the time you can check it.

thanks Mariano

Je Gold

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: ICP problems on custom board
« Reply #9 on: March 28, 2007, 07:04:36 am »
OK,  I have looked at your circuit above.

Q1
How did you determine the 10k resistor values around the NPN (BC548) and PNP (BC558) switching on VDD_2?

Q2
Did you measure the voltage of VDD_2 when it was on?  What was the measured VDD_2 voltage?

Comment1
I did a Spice simulation of the BC548  - BC558 load switch combination.... as worst case is VDD_2 is very close to 2.4V the VDD low threshold of the LPC932A1....  VDD_2 should be more like 3V to program flash correctly.

Suggestion1
Have a look at my suggestions for the ICP  Vdd switch in the FlashMagic Resources page here.

http://www.flashmagictool.com/assets/resources/ICPBridgeVddSwitch.pdf

My circuit turns the PNP (BC558)  [ ~ 2N3906 ]  a lot harder and gives more VDD_2 towards 3V.

joe


Mariano D

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: ICP problems on custom board
« Reply #10 on: March 28, 2007, 08:11:44 am »
Joe,

The big difference I think is on the base resistor of the PNP transistor, in your circuit is 1K and in the mine is 10K.
I will change it and get back to you, the both transistor 2N3906 and BC558 are very similar, and if you look the datasheet you will see similars VCEsat voltages versus IC current.
But if I didn t get good results with the resistors I will change it too.

Mariano

Je Gold

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: ICP problems on custom board
« Reply #11 on: March 28, 2007, 05:07:44 pm »
Now your thinking in the right direction.

Yes transistors have similar characteristics for VDD switching requirements.

IN ADDITION

P2.3 [VDD control] configured as Quasi-Bidirectional in in prog90x.hex ver1.6 (and probably ver1.7) - so it's HIGH level output drive characteristic is not strong.
 :D
Joe

Je Gold

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: ICP problems on custom board
« Reply #12 on: April 06, 2007, 01:35:16 am »
So did it work Mariano?

Joe

Mariano D

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: ICP problems on custom board
« Reply #13 on: April 10, 2007, 05:00:16 pm »
Unfortunly not Joe, I'm using the programer on ISP and go forward with my project.
Even when have some time I will be trying again, sorry for the late response. Maybe I will post some measurements of my board too.

Joe

[/quote]

Je Gold

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: ICP problems on custom board
« Reply #14 on: April 12, 2007, 04:26:58 am »
Yes, ICP is hardware and software wise a little more difficult (but need for the LPC900 parts under 20pins), unless you purchase a profesional programmer.

If you have ISP working then also have a look at the resources page on LPC935 NoTouch..  Based on Eirks  NoTouch concpets.


Joe