Electronic – Random microcontroller deaths

damagemicrocontroller

I'm eager for help in figuring out why all the microcontrollers I'm using are dying randomly. At first, I was using LPC810Ms and LPC1114FN28s (both DIP packages on a breadboard), so I overlooked the problem since plugging in a new one was no big deal. But now, I'm using STM32F437s (100 QFP package soldered on a prototyping board), which at $17 a piece, and requiring a fair amount of soldering, makes replacement pretty expensive.

My power supply is pretty unconventional. It's an Antec HCG-850M computer power supply with the under voltage & over current protection removed, so I can run RC car motors without tripping. As a result of removing UVP & OCP, I noticed turning off the switch results in a very gradual voltage decay (takes > 10s for the voltage to reach 0). Could this be breaking the MCUs?

In general, the only peripherals I have connected are a Segger JLink for ARM debugging and a UART.

Symptoms:

  1. LPC810, LPC1114FN28:

    The chip gets very hot, eventually burning out. Surprisingly, I can still program and run things.

  2. STM32F437:

    The ARM SWD interface becomes inoperable. I can no longer program or run. No signs of overheating. I remember exactly that it broke right after I cut off the power, which happens very slowly as mentioned above.

I'm not expecting a too specific answer, so please share any relevant experiences.


Update

Correction: the voltage doesn't take 10s to die off (that was a guess based on how long it took the lights & fan to turn off). Instead, it drops instantly after 5 seconds.

I've measured the power supply on/off transient behavior several times and don't see any spikes. Here's the waveform when turning on:

This is within the allowed range (1.7V <= Vdd <= 3.6V).

Pictures/Diagrams:

(only colored pins are connected)

enter image description here

enter image description here

Update2

Finally, I've found the problem! but not the real cause. Thanks to clive1 on the ST forum thread, STM32F4 – Discovery fail, I resurrected the chip by switching the BOOT pin to 1, so it boots from RAM, instead of Flash. So it wasn't dead – just bricked (don't understand why the debugging interface depends on working Flash)

So now I'll make my question more specific: Why is the MCU's flash memory getting corrupted on powerup, powerdown, or resets? Also, forget about the LPC MCUs.

Best Answer

There are several reasons why microcontrollers would act as described above. The three most common causes are:

  1. You are trying to supply too much power. Putting 12 volts into a 5 volt chip will kill it instantly, for example.
  2. Your loads are drawing too much current. The microcontrollers can only source a certain amount of current, and trying to draw more than that (for example, trying to run a motor directly from the chip's output) will likely cause it to burn out.
  3. Shorted pins

To fix these issues, try the following:

  • Most microcontrollers require either 3.3V or 5V to operate. Check your chip's datasheet to make sure you're not supplying too much power.
  • If you're driving large loads, like motors or coils, use a transistor connected (through a base resistor) to the microcontroller. Then you can control the transistor with the microcontroller, but the load will draw its power from the main power supply instead of from the chip.
  • Check that your wiring is correct. Ensure no pins are touching, that you don't have any solder bridges (if your chip is soldered into a circuit), etc. Make sure the schematic is followed exactly.

The problem you are facing most likely stems from one of the above problems, so check through them and see if they help.