Did I brick an ATmega32U4 by writing flash via Atmel Studio?

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
makiyoung
Posts: 1
Joined: Wed Jun 28, 2017 9:44 am
Contact:

Did I brick an ATmega32U4 by writing flash via Atmel Studio?

Post by makiyoung »

I am experimenting with ATmega32U4 chip, in the end I hope to achieve to get my Arduino Micro code running in an ATmega32U4 chip (placed on a custom PCB).

I connected the ATmega32U4 chip (which has wiring to micro USB) to my Windows 10 PC via USB. After installing Atmel Studio 7 (installs some drivers too), the chip was successfully recognized, device manager detects an ATmega32U4 chip.

The next thing I did, was attempt to write my .HEX (compiled by Arduino IDE) file via Atmel Studio >> Tools >> Device Programming to the flash memory of the ATmega chip (Atmel stated flash was written successfully).

Here isthe datesheet of atmega32u4


After that, Atmel Studio was no longer able to connect to the ATmega chip (Atmel Studio shows "disconnected" for the ATmega in the Tools >> Device programming dialog). Also the device manager in Windows 10 no longer detects the chip when I reconnect the USB cable to the ATmega chip.

As I said, I am still learning and probably need to learn a whole lot more but:

Did I reprogram the default ISP bootloader on the ATmega, which was solely responsible to communicate over USB?
Or is that complete nonsense, and is it more likely that I damaged the chip electrically and burned something?
Is it a bad idea to flash HEX files via Atmel Studio? I thought that would be my easy way out of using a SPI programmer (which I also never used before)

Hoping for somebody willing to teach me some of the fundamentals here!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Did I brick an ATmega32U4 by writing flash via Atmel Stu

Post by Benj »

Hello,

Are you using a programmer such as the TinyISP or AVRISPmkII?

If not and you are programming the chip purely via a USB to Serial Arduino style bootloader (firmware on the AVR) then reprogramming may have erased or overwritten the bootloader which was allowing you to program the device. Programming via the bootloader shouldn't break the bootloader but there are probably ways and means. Did you program the fuses when sending the program?

To recover the bootloader or to program without using the bootloader one of the above mentioned programmers will allow you to reprogram the chip with the Arduino bootloader firmware.

Post Reply