ATmega 32U4 ISP programming

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

Has anyone else had any issues programming ATmega 32U4 AVRs with an AVR Dragon and Atmel Studio 6 and 7?

 

I keep getting the following error:

"Failed to enter programming mode. ispEnterProgMode: Error status received: Got 0xc0, expected 0x00 (Command has failed to execute on the tool)"

 

I've :

- checked ISP clock is 125KHz (and tried lower)

- tried 2 AVR Dragons

- tried 3 different (brand new) AVRs in 3 different PCBs (2 adapter to DIP boards and a project PCB)

- ensured that debug mode is off (is actually greyed out),

- tried it with Studio 6

- upgraded to Studio 7

- Flashed the AVR Dragon firmware when offered on 1st time use of Studio 7

- Checked that RESET has a 4k7 pullup resistor to VCC on it (on all 3 PCBs)

- Checked that MISO goes to pin 11 (PB3) (on all 3 PCBs)

- Checked that MOSI goes to pin 10 (PB2) (on all 3 PCBs)

- Checked that SCK goes to pin 9 (PB1) (on all 3 PCBs)

- Checked VCC (4.9V) and GND connections (on all 3 PCBs)

- Checked for shorts to ground (on all 3 PCBs)

 

Am I missing something here?

 

 

This topic has a solution.
Last Edited: Tue. Apr 10, 2018 - 12:59 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Surely a 32U4 expects a crystal because it is an USB AVR.

 

Either connect via JTAG or supply a clock for ISP.

 

It should have come from the factory with a DFU bootloader that will work as soon as you connect a crystal and USB socket.

 

Any subsequent JTAG or ISP programming will destroy the DFU bootloader.

 

David.

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

(uber facepalm) Thought it had an inbuilt 8MHz clock. I will try this asap and advise. Thanks :)

 

[edit]

There is an 8MHz internal oscillator present (and I have not changed/been able to change any fuses). Also, JTAG is not working either. Tried two 32U4's.

Last Edited: Tue. Apr 10, 2018 - 12:04 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

(uber facepalm) Thought it had an inbuilt 8MHz clock. I will try this asap and advise. Thanks :)

It does.  It's just not selected with the factory-default fuses.  You can change the fuses, of course, but for that you need to provide a clock first.

 

Atmel/Microchip ship the exact same part with the fuses set for the internal RC oscillator.  It's the ATmega32U4RC.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

Thanks guys - it works with a 16MHz external oscillator. I will keep this in mind in the future. Not sure why JTAG didn't work, but try that again tomorrow.

 

Again, uch appreciated :)