I have made a Arduino Leonardo clone and have been trying to burn a bootloader into it. I am still unable to connect to the Atmega32u4. It says "Unable to enter programming mode.

"Unable to enter programming mode.Please verify device selection, interface settings, target power and connections to the target device."

I have all the pins connected fine and I rechecked them. I had a chip before and it was detected. It was an Atmega32u4 with internal RC oscillator. The new one has an external one. So I think its this crystal thats messing things up. I placed a probe on the crystal and it shows a dc level of 1V. Shld it not show 5V pure sine wave. As far as I know a crystal and 2 balancing capacitors are sufficient for such circuits. I feel the balancing capacitors (18pF) are making it misbehave.

Also, do I need a working crystal to detect the controller via the AVR ISP. The Vcc and GND pins are as shown in image Crystal and VCC / GND

The reset pin has a 10K pull up and 100nF cap. These are not so close to the reset pin. But, I dont think it can cause any disruption. I strongly suspect that the crystal is the culprit here.

The programming header is as shown in 2nd image ![Programming header2

I would apreciate any tips please. Now, the crystal I use is 535-10907-1-ND(digikey part). The Cl = 10pF. I calculate the C1 = C2 = 15pF. But I placed 18pF. But, can it cause such a drastic malfunction. Also, how is it possible to test a crystal. Is it a question of fuses.

  • \$\begingroup\$ Are you sure you placed the right caps? You have other 0402 values in your circuit, could one of them have been used by mistake? Also consider temporarily skipping your programing harness by tack soldering some small wires. \$\endgroup\$ – Chris Stratton Oct 17 '14 at 18:27

18pF capacitors will cause the crystal to oscillate at slightly lower frequency, but shouldn't stop it from working. To check that it is oscillating you need a high impedance probe (eg. oscilloscope probe on x10 position) connected to pin 16 of the ATmega. You should see a sine wave with peak-to-peak amplitude of at least 2V.

If you just see a DC level of around 1~2V then the crystal is not oscillating, either because it is faulty or not connected. Are you sure that you have it orientated correctly?

enter image description here

  • \$\begingroup\$ Note you can't really mis-orient that crystal during installation, though you can layout a mirrored PCB footprint by mistake. \$\endgroup\$ – Chris Stratton Oct 17 '14 at 18:24
  • \$\begingroup\$ I checked it the connections and the solder are fine. It was done using a stencil and by an EMS vendor. But this crystal really baffles me :( I also checked the reflow profile just incase they messed up the temperature. Its fine in that as well. I am really clueless about this. So crystals should give pure sine wave even if there is no code existing in the controller. As long as there is power to the MCU the crystals shld oscillate, right. \$\endgroup\$ – Board-Man Oct 18 '14 at 16:14
  • \$\begingroup\$ If the xtal is good, and the caps are equal values <50pF, and your ATmega32U4 is the stock External Xtal version, then then it should oscillate as soon as power is applied. So one of those components must be faulty. To diagnose I would start by removing the caps. If it still doesn't work then remove the xtal and replace it with another xtal or ceramic resonator (any frequency of about 4~16MHz should work for just testing the oscillator circuit). \$\endgroup\$ – Bruce Abbott Oct 18 '14 at 19:15
  • \$\begingroup\$ The EMS (solder person) had mis oriented the chip. Thank you all for the support . \$\endgroup\$ – Board-Man Oct 20 '14 at 11:14
  • \$\begingroup\$ If you make the PCB footprint yourself another issue you can run into is insufficient solder mask... the solder will then pool around the pads and short out the chip (It will possibly function for awhile then die) I've observed this in practice. \$\endgroup\$ – cb88 Nov 5 '15 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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