I have this board:
Arduino Leonardo Beetle mini board
It has the atmega32u4
chip.
I have updated its code several times, and used it without issues for several months. Today, while updating (using Arduino IDE) it started to throw some errors. At the end it said that the checksum didn't match, so I repeated again few more times with the same behavior until it reported "Uploaded" without errors. I used for few minutes and it was working as expected. Then, I had to do another update and the same happened (checksum didn't match). However this time I got to the point in which it was no longer detected by the OS (Ubuntu), and no LED is turning on.
Whenever I connect it to the USB port, I can only see in the logs:
usb 1-9.4: new full-speed USB device number 9 using xhci_hcd
However /dev/ttyACM0
is not longer created.
I'm trying to use avrdude
to reset it, but it is reporting:
avrdude: ser_open(): can't open device "/dev/ttyACM0": No such file or directory
which make sense as /dev/ttyACM0
doesn't exists. So, what are my options? Is there anything I can do to make it work again?
UPDATE
I didn't realize that this board has a reset marked as "RES". Following Juraj
recommendation I bridged RES
and GND
. The LED marked as "SDA" turns ON after I release the contact and I can read in the logs:
[1212051.679205] usb 1-9.4: USB disconnect, device number 22
[1212058.532030] usb 1-9.4: new full-speed USB device number 23 using xhci_hcd
[1212058.621972] usb 1-9.4: New USB device found, idVendor=2341, idProduct=0036
[1212058.621982] usb 1-9.4: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[1212058.621988] usb 1-9.4: Product: Arduino Leonardo
[1212058.621994] usb 1-9.4: Manufacturer: Arduino LLC
[1212058.622933] cdc_acm 1-9.4:1.0: ttyACM0: USB ACM device
Which I think its good news. However, it seems ttyACM0 becomes available for few seconds. I was able to upload the Blink example into the chip and I can confirm its working because its blinking. Still the ttyACM0 disappears after few seconds.
Output of avrdude -c avr109 -p atmega32u4 -P /dev/ttyACM0
:
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices:
Device code: 0x44
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: safemode: Fuses OK (E:FB, H:D8, L:FF)
avrdude done. Thank you.
-
1did you try double reset to activate the bootloader? did you try other USB port? try to clean the USB contacts.Juraj– Juraj ♦2019年10月18日 06:46:35 +00:00Commented Oct 18, 2019 at 6:46
-
I tried other USB ports and other computers as well. How do I double reset it?lepe– lepe2019年10月18日 06:54:48 +00:00Commented Oct 18, 2019 at 6:54
-
1wire a button between reset pin and ground and push it twice. the bootloader will handle the USB for a moment. then try to upload a small working sketch (Blink for example)Juraj– Juraj ♦2019年10月18日 07:04:54 +00:00Commented Oct 18, 2019 at 7:04
-
ok I will do that. I updated my question and as you can see, it seems to be workinglepe– lepe2019年10月18日 07:11:39 +00:00Commented Oct 18, 2019 at 7:11
-
Added blink, its working. Thanks, but ttyACM0 its being removed after few seconds... is that normal?lepe– lepe2019年10月18日 07:17:21 +00:00Commented Oct 18, 2019 at 7:17
1 Answer 1
Probably you have overwritten your Bootloader.
Connect MOSI, MISO, SCK and RESET to an ISP-Programmer and flash the file Caterina-LilyPadUSB.hex to it.
There are lots of tutorials on the net how to use a spare arduino as an ISP-Programmer.
Explore related questions
See similar questions with these tags.