0

I've designed a custom board meant for high-powered model rocket telemetry & duel-deployment. (More info upon request)

To do this, I've soldered a ATMEGA2560 (yes, overkill, but I needed multiple hardware serials), with the plan on using the ICSP programming header I designed on the board to burn the Arduino bootloader, and then use the super-easy ftdi-compatible serial connector to program the board....

Problem is, I have thus far been completely unable to burn the bootloader. I've double-checked the wiring ten times, checked the labeling on my board, checked my board's schematic twice, and re-checked the chip's datasheet to make sure I didn't screw up the pinout, even held a jumper past my fancy reset circuitry that I largely copied from the official Uno schematic.

I've largely been using Nick Gammon's excellent "bootloader programmer" sketch Link on a Clone Arduino Mega. But I've tested the connections and sketch by using it to program the bootloader on a Arduino Pro Mini successfully with no hitch at all. :(

Attempting to enter ICSP programming mode.......................................... Failed to enter programming mode. Double-check wiring!

Here's a Board and (Schematic I can't post because I'[m new to the Arduino side of stack overflow... so replace the URL with schematic.png) of my board, and I'll upload a picture of my soldered board soon, but I'm actually quite confident of my soldering job...

Really just completely out of ideas, and very demoralized because the project I've been working on for months isn't working, and I have nothing specific to even point at...

1 Answer 1

1

I have thus far been completely unable to burn the bootloader.

In what sense? What (error) messages did you get?

In your shoes I would be seeing if I can "talk" to the chip. My chip detector sketch will help you to see if the chip is "alive" or not. See my post about Have I bricked my Arduino Uno? Problems with uploading to board

You may possibly have inappropriate fuse settings for your clock source. If you get some sort of response from the chip using the chip detector sketch please post what it is.


Also to note is that this is a completely virgin chip from the manufacturer, so I'm not sure what the clock settings come as in that case

According to the datasheet, 8 MHz internal oscillator with CKDIV8 fuse set. That should work.

However you need to resolve that before going any further. I would be taking voltage readings at various points.

  • Make sure you have Vcc at all the appropriate places, and Gnd.
  • Note that there are multiple Gnd and Vcc pins. You should also have 5V at AVcc.
  • Check that /RESET is normally high (5V) and check that it drops to 0V during the programming attempt (and stays there).
  • Check you have decoupling capacitors between Vcc and Gnd where necessary.
  • Assuming you have the TQFP-pinout chip, make sure that you have your SPI connections at pins 19, 20, 21 and 22.
  • If you have a scope or logic analyser make sure that there is some "action" on SCK, MOSI pins during attempts to program it. There should also be a response on MISO.
  • There should not be a capacitor in series with /RESET as I have occasionally seen people do. The programmer has to hold /RESET low during the entire programming sequence.
6
  • Sadly, both the chip detector sketch & the board programmer sketch give up at the same point- Attempting to enter ICSP programming mode ...................................................... Failed to enter programming mode. Double-check wiring! So I'm assuming there's no response at all, which is a bit worrisome. Also to note is that this is a completely virgin chip from the manufacturer, so I'm not sure what the clock settings come as in that case...
    – 1n5aN1aC
    Sep 6, 2016 at 16:49
  • See amended answer.
    – Nick Gammon
    Sep 6, 2016 at 23:36
  • Also make sure your circuit ground is connected to the PC/programmer ground; I went through almost all the troubleshooting listed in this answer when an ATMEGA 328p of mine suddenly couldn't be programmed, only to find i missed the connection between my PC ground and the circuit ground!
    – esoterik
    Sep 7, 2016 at 2:45
  • @Nick Gammon Thanks, this is helpful! I think I'm good on all of these points except for 2: Yes, it's TQFP, but do you need pin 19? (/SS) I foolishly left it floating, which I suppose could cause some issues? Also, I made the /Reset capacitor mistake. (Different kind of reset, apparently) but I've since connected a wire to the /RESET side of the capacitor, to pin 10 on the programming mega, with no difference.
    – 1n5aN1aC
    Sep 7, 2016 at 3:13
  • @esoterik Yeah, the ground from the SPI is connected to the ground for everything else as well, and each of the 5 gnd's on the chip as well. I only have one ground net. :P Good idea, though.
    – 1n5aN1aC
    Sep 7, 2016 at 3:16

Your Answer

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

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