failed to enter programming mode ..

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I made a PCB with ATmega2560. I mounted the AVR and a 16Mhz crystal oscillator with a feedback resistor and load capacitors. Also I mounted 0.1uF bypass capacitors (for VCC, AVCC pins). Then I tried to see if the chip can be programmed. Using AVR Dragon I applied 4.9V to my board and connected the ISP pins in my board to AVR Dragon. After that I tried reading Device Signature in Atmel Studio. However, I just see the error message 'failed to enter programming mode". Could one please suggest causes?

 

Some more details are below.

- The chip consumes 30mA from the AVR Dragon.

- In Atmel Studio the error persists regardless of ISP clock frequency. I tried down to 51Hz but it didn't solve the issue.

- With a scope I see that AVR Dragon generates SCLK, MOSI signals, but the MISO line is stable (a bit lower than 5V). It seems somehow the ATmega2560 does not respond.

- The voltages of XTAL1, XTAL2 are 0V. I'm not sure if it is normal or not. The chip that I use has never been programmed.

- I used a 100kohm pull up resistor for RESET pin. I don't have 10kohm and 4.7kohm, so I used 100k instead.

- I pulled up SPI_CS pin to 4.9V.

 

Last Edited: Mon. Jul 16, 2018 - 11:42 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A "fresh" chip will run at 1MHz from the internal RC oscillator (8MHz / 8) until you manage to program the fuses. So don't expect to see any "crystal activity" until you have had a successful ISP session and managed to change fuses to enable the crystal. Because it is 1MHz it should be ISP-able at anything from 250kHz down.

 

30mA sounds kind of high for a quiescent AVR with nothing attached??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Schematic and a picture of your setup can help a lot with this kind of problem

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Clawson,

 

thank you for your comment on the crystal.

 

I turned out that flux residue created a kind of short circuit. I assembled an identical PCB and downloaded a bootloader without issues.

 

thanks