I am developing an application on LPC2138. I prepared prototype using a standard development board. After completion, I shifted to final board. But I am not able to download any program my LPC2138.

Connections are correct. I compared with my development board and checked every single pin. Voltage difference at VCC and VSS is 3.3V. Reset pin is high. Crystal is supplying fine square wave.

My final doubt is on Chip. I might have purchased a faulty or Fake LPC2138. Is there any way to identify that Chip is good and I am missing something in programming.

P.S.: I grounded BSL pin, RESET the circuit. Ideally it should go in Bootloader and if I send "U" it should return "?". This happens on my development board but no response from final board.


3 Answers 3


It's unlikely your part is counterfeit, especially if you purchased it from a reputable distributor. Have you verified the following from this datasheet:

  • Is your P1.26/RTCK pin pulled low? After reset the LPC2138 will sample the RTCK pin and if this is low the JTAG pins will be used as JTAG, otherwise they will be used as GPIO pins. (Page 12)
  • The P0.31 pin MUST NOT be externally pulled LOW when RESET pin is LOW or the JTAG port will be disabled. (Page 11)

Reset pin is high.

How is your RESET pin pulled high, what value resistor?

Detecting Counterfeits

There are companies you can send a part to and have it tested, American Counterfeit Detection is one such company.

Some of the signs to look for are:

  • Misspellings on the manufacturers labels
  • Scratches or sanding marks
  • Verification that the date code on the label match dates codes on the parts
  • Date codes that are not possible. ex. 0657
  • Date codes that are in the future
  • If parts are moisture sensitive they require a dry pack and a Humidity indicator card. Often the counterfeiters forget some piece of the moisture sensitive parts requirements.

This is a great resource for identifying counterfeit parts by visual inspection: Detection of Counterfeit Electronic Components

The following pictures show chips that have been sanded. Normally when a chip is molded it will not have any scratch marks.

enter image description hereenter image description here

Here you can see a marking that is easily wiped off.

enter image description here

Here you can see that they have attempted to re-stamp over the existing stamp.

enter image description here

Aside from a external visual inspection, here are some other methods used:

  • Functional Testing
  • X-Ray, X-RF, or SAM Inspection
  • Decapsulation
  • Hermetically Sealed Electronic Component Leak Detection

Integra Counterfeit IC Detection Methods:

enter image description here

  • 2
    \$\begingroup\$ Interesting read about the Counterfeiting! +1 \$\endgroup\$
    – jippie
    Dec 28, 2012 at 11:20
  • \$\begingroup\$ @jippie yah, there's another similar one I couldn't find that is more about through hole components and there are some crazy pictures, like a tiny cap inside a large one and relays that are only filled with potting material, etc. \$\endgroup\$ Dec 28, 2012 at 13:23
  • 2
    \$\begingroup\$ :) cool. why do some people get away with that, and do I have to work hard for a living? \$\endgroup\$
    – jippie
    Dec 28, 2012 at 13:27
  • \$\begingroup\$ I got 22K Pull up Resistor for Reset! \$\endgroup\$
    – Swanand
    Jan 1, 2013 at 13:35
  • \$\begingroup\$ @Swanand and your sure it has the bootloader installed by default (it hasn't been overwritten etc)? Have you seen this? Are you using a JTAG or ISP? Update your question if you sill can't get it to work so that it is active again. \$\endgroup\$ Jan 1, 2013 at 14:48

Waitaminit ... when you reset it, it should go into bootloader?

So when you bought an LPC2138 for your target board, how did the bootloader get programmed into it?

Did you buy it specifically from the same vendor as the development board, as an LPC2138 with the correct bootloader pre-programmed?

Or did you buy an un-programmed device and program in the bootloader yourself?

EDIT : the bootloader appears to be pre-programmed at manufacture. However the only way to clear security keys on these chips is a full chip erase, and it is unclear to me what that does to the original bootloader...

So here's one scenario : the bootloader is not being started after reset.

I found a dev board manual with some troubleshooting information on starting the bootloader - at reset. P0.14 must see logic level 0 to neter the bootloader.

Another possible scenario : a genuine, hopefully working, but re-used part after a full-chip erase.

So some of the following may still be useful - it ought to be possible to read the flash memory via JTAG and verify whether the bootloader is present and correct...

Here's an outline : you need programming hardware. The dev board may be able to do that : is there anything in its doc about "programming target devices"?

Otherwise, programming hardware can be as simple as an "ISP interface" usually a 6-pin JTAG connector on your board. This connects to a JTAG adapter (probably your dev board) by ribbon cable, and communicates (usually via USB) with programming software on your development computer.

Finding, installing and using it is up to you...

Add a link to your development board for more detailed help.

  • \$\begingroup\$ Wow... That was an eye opener! Yes, Bought a simple LPC2138 over the shelf... And I thought NXP sells chips with bootloader! Are you sure?? \$\endgroup\$
    – Swanand
    Dec 28, 2012 at 10:35
  • \$\begingroup\$ They might sell them with bootloader, but they would say so! Otherwise assume it's blank. I'm editing the answer... \$\endgroup\$
    – user16324
    Dec 28, 2012 at 10:39
  • 1
    \$\begingroup\$ I take it back : the LPC2138 documentation does say something about on-chip bootloader software. This is a bit unusual among microcontrollers, I wouldn't have expected it... \$\endgroup\$
    – user16324
    Dec 28, 2012 at 11:07
  • \$\begingroup\$ But is it the correct bootloader, if any. \$\endgroup\$
    – jippie
    Dec 28, 2012 at 11:22
  • \$\begingroup\$ The bootloader appears to be preprogrammed. However there are certain steps to enable it : logic level 0 on P0.14 at reset is important. And it might be possible to verify the bootloader contents via the JTAG interface - compare with the working device on dev board. \$\endgroup\$
    – user16324
    Dec 28, 2012 at 11:28

The easiest way to identify a fake is if the labeling on the chip is substantially sloppy compared to a known good chip ( http://www.bunniestudios.com/blog/?page_id=1022 ). This only helps for obvious fakes. Sometimes a official factory is used to produce fakes off the clock, so you can't even tell by that. It's even a problem for the government ( http://www.bunniestudios.com/blog/?p=2037 )

Aside from the obvious manufacturing issues (not exactly the right product packaging, or ic packaging [you get a 0.65mm pitch ic when it should be a 0.5mm pitch], the labels aren't what they should be), the only other way to identify if it is a fake, is by cutting it open, and again, comparing it to a known good version. Not something the average joe can do (remove the top layers of the protective packaging, take a electron microscope to compare) (unless you are lucky and can plainly see that the chip has no internals).

  • 1
    \$\begingroup\$ I interpreted it as "Sorry, You can't! " \$\endgroup\$
    – Swanand
    Dec 28, 2012 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.