Unable to Restore Bootloader
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- davidbitton
- Posts: 33
- Joined: Sun Apr 24, 2016 1:03 am
Unable to Restore Bootloader
The bootloader is not responding on my 5/16 Pro Trinket. I have a green LED; no red. I can use an Arduino Uno as an ISP to at least connect to the board with avrdude and obtain an identifier from the chip. The bootloader reload sketch for Uno does not work. It is only able to get 0xFFFF for the 328p identifier and not the value avrdude returns at the command line. Further, my Mac isn't showing a USBtiny attached. What shall I do? Thanks.
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Unable to Restore Bootloader
Just to make sure, are you trying to follow this process?
https://learn.adafruit.com/introducing- ... bootloader
https://learn.adafruit.com/introducing- ... bootloader
- davidbitton
- Posts: 33
- Joined: Sun Apr 24, 2016 1:03 am
Re: Unable to Restore Bootloader
Yes. I threw in a Serial.println after the code grabs the identifier, and it comes out as Fs.
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Unable to Restore Bootloader
Sorry, I should have first asked if the bootloader ever worked. And you're trying to fix it because it stopped responding? Or has it just never worked?
- davidbitton
- Posts: 33
- Joined: Sun Apr 24, 2016 1:03 am
Re: Unable to Restore Bootloader
I not recall if it ever worked. I thought I may have overwritten it.
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Unable to Restore Bootloader
Maybe you didn't actually override it, since you had trouble running that sketch. Assuming the bootloader is still on there, one thing to check is to make sure you have a good USB cable. If it is charge only, the Trinket will not go into bootloader mode as it needs to see data on the USB lines.
- davidbitton
- Posts: 33
- Joined: Sun Apr 24, 2016 1:03 am
Re: Unable to Restore Bootloader
So this is where I'm at. Using an Uno with the ArduinoISP sketch loaded and connected to the Pro Trinket, I get this
Further, with the Uno still attached, I tried to load the Blink example sketch. I set the Arduino IDE board to Pro Trinket 5/16 FTDI. This is the output
However no blink. If I hit the reset button, the Red LED lights up while I hold the button, but then goes out. What shall I do at this point?
Code: Select all
bittondb:ProTrinket/ $ avrdude -c arduino -P /dev/cu.usbmodem1421 -p atmega328p
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: Fuses OK (E:00, H:00, L:00)
avrdude done. Thank you.
bittondb:ProTrinket/ $
Code: Select all
/Users/bittondb/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C/Users/bittondb/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -v -V -patmega328p -carduino -P/dev/cu.usbmodem1421 -b115200 -D -Uflash:w:/var/folders/nk/n29krwvj22s9xfk72mk0tt7h0000gn/T/arduino_build_539257/Blink.ino.hex:i
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:01:35
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/bittondb/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
User configuration file is "/Users/bittondb/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbmodem1421
Using Programmer : arduino
Overriding Baud Rate : 115200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
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 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 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 : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/var/folders/nk/n29krwvj22s9xfk72mk0tt7h0000gn/T/arduino_build_539257/Blink.ino.hex"
avrdude: writing flash (940 bytes):
Writing | ################################################## | 100% 0.16s
avrdude: 940 bytes of flash written
avrdude done. Thank you.
- davidbitton
- Posts: 33
- Joined: Sun Apr 24, 2016 1:03 am
Re: Unable to Restore Bootloader
Here's the output from the bootloader sketch:
Code: Select all
Adafruit Trinket 5V programmer - June 9 2015
Type 'G' or hit BUTTON for next chip
Starting Program Mode [OK]
Reading signature:FFFF
65535
Searching for image...
Not Found
Image fail
- davidbitton
- Posts: 33
- Joined: Sun Apr 24, 2016 1:03 am
Re: Unable to Restore Bootloader
I also tried using a Mega in lieu of the Uno and received this:
Code: Select all
Adafruit Trinket 5V programmer - June 9 2015
Type 'G' or hit BUTTON for next chip
Starting Program Mode [OK]
Reading signature:0
(no target attached?)
Signature fail
- davidbitton
- Posts: 33
- Joined: Sun Apr 24, 2016 1:03 am
Re: Unable to Restore Bootloader
I was able to use a USBasp, and loaded the pro hex file, but I keep receiving an error when trying to write the efuse. Can you provide assistance based on using a USBasp? Thanks!
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Unable to Restore Bootloader
We haven't tested with the USBasp.
Go back to the UNO setup for programming the bootloader:
https://learn.adafruit.com/introducing- ... bootloader
and try again. Post a photo of this setup showing all connections.
Go back to the UNO setup for programming the bootloader:
https://learn.adafruit.com/introducing- ... bootloader
and try again. Post a photo of this setup showing all connections.
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Unable to Restore Bootloader
That all looks good. It looks like you've done this already above, but just to be clear, what is the output you get if you run the sketch from here:
https://learn.adafruit.com/introducing- ... bootloader
with that setup?
https://learn.adafruit.com/introducing- ... bootloader
with that setup?
- davidbitton
- Posts: 33
- Joined: Sun Apr 24, 2016 1:03 am
Re: Unable to Restore Bootloader
Adafruit Trinket 5V programmer - June 9 2015
Type 'G' or hit BUTTON for next chip
Starting Program Mode [OK]
Reading signature:FFFF
Searching for image...
Not Found
Image fail
Type 'G' or hit BUTTON for next chip
Starting Program Mode [OK]
Reading signature:FFFF
Searching for image...
Not Found
Image fail
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Unable to Restore Bootloader
OK, kind of back where we started, but the photos and the output help. You're pretty much doing everything per that guide and it's not working. I'll pass that info on in case there is something out of date with the guide.
In the mean time, let's go back to the idea that maybe the bootloader is still on the board (maybe). You say you get this:
In the mean time, let's go back to the idea that maybe the bootloader is still on the board (maybe). You say you get this:
Which is how it would behave if it didn't see any data on the USB line. So, back to the question of the USB cable - are you sure it's a good data cable?If I hit the reset button, the Red LED lights up while I hold the button, but then goes out. What shall I do at this point?
Please be positive and constructive with your questions and comments.