0

My project is based around the ATMEGA32u4 microcontroller.

I followed the Arduino Pro Micro schematic to design my own board layout and build a custom PCB, soldered on the components. Then I used the Arduino IDE to successfully upload the Arduino bootloader with SPI.

Currently I can also upload programs to my `32u4 over SPI (using "in-serial programming"). Tested that with Blink.

But I cannot upload programs with the USB, like you would normally be able to do with a Pro Micro. What things should I look for to debug this?

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
 Copyright (c) 2007-2014 Joerg Wunsch
 System wide configuration file is "C:\Users\Myname\AppData\Local\Arduino15\packages\arduino\tools\avrdude6円.3.0-arduino9/etc/avrdude.conf"
 Using Port : COM12
 Using Programmer : avr109
 Overriding Baud Rate : 57600
 AVR Part : ATmega32U4
 Chip Erase delay : 9000 us
 PAGEL : PD7
 BS2 : PA0
 RESET disposition : dedicated
 RETRY pulse : SCK
 serial program mode : yes
 parallel program mode : yes
 Timeout : 200
 StabDelay : 100
 CmdexeDelay : 25
 SyncLoops : 32
 ByteDelay : 0
 PollIndex : 3
 PollValue : 0x53
 Memory Detail :
 Block Poll Page Polled
 Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
 eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
 flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
 lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
 hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
 efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
 lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
 calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
 Programmer Type : butterfly
 Description : Atmel AppNote AVR109 Boot Loader
Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding
asked May 10, 2018 at 14:15
4
  • 1
    When you program the blink sketch using ISP, you overwrite the bootloader!!! Did you set the correct fuses? How did you program the bootloader? Commented May 10, 2018 at 15:53
  • Oh, I did not know that. I used an Arduino UNO as a SPI master to upload the bootloader to my 32u4. After that I uploaded a blink sketch the same way. I will try uploading the bootloader again and then the sketch via USB. Commented May 10, 2018 at 16:19
  • Yes, that worked. Thanks, would have taken me a long time to work that out. I will post a reply. Commented May 10, 2018 at 16:25
  • 1
    It’s one of those gotchas. Glad you got it working now. Commented May 10, 2018 at 16:26

1 Answer 1

1

The answer, as kindly pointed out by Gerben, is that ISP program upload overwrites the bootloader.

Only upload the bootloader via ISP, then switch to USB for uploading Arduino sketches.

answered May 10, 2018 at 16:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.