0

Pro trinket programming failure
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Pro trinket programming failure

by juliemac on Thu Nov 10, 2016 12:06 pm

I installed the files as described. The Arduino IDE is set to 3v/12mhz trinket and the programmer is set to USBtinyISP.
I press the reset button and the LED fades in and out. I then click the upload button to move Blink to the trinket.
Below is a partial read of the log for the upload.
What am I doing wrong?

<AVRdude>
avrdude: 1078 bytes of flash written
avrdude: verifying flash memory against C:\Users\Julie\AppData\Local\Temp\build9c9ef3bdfe2fccb480bc6e4bac749e41.tmp/Blink.ino.hex:
avrdude: load data flash data from input file C:\Users\Julie\AppData\Local\Temp\build9c9ef3bdfe2fccb480bc6e4bac749e41.tmp/Blink.ino.hex:
avrdude: input file C:\Users\Julie\AppData\Local\Temp\build9c9ef3bdfe2fccb480bc6e4bac749e41.tmp/Blink.ino.hex contains 1078 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.12s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0008
0xff != 0x0c
avrdude: verification error; content mismatch

avrdude done. Thank you.
</AVRdude>

Thanks!

juliemac
 
Posts: 9
Joined: Mon Jan 27, 2014 8:50 pm

Re: Pro trinket programming failure

by adafruit_support_jarek on Fri Nov 11, 2016 1:38 pm

Hi there! Can you please take a picture and attach it to a reply so we can see how your hardware is set up?

adafruit_support_jarek
 
Posts: 324
Joined: Tue Nov 08, 2016 11:48 am

Re: Pro trinket programming failure

by juliemac on Fri Nov 11, 2016 2:55 pm

A pic?
Its a pro trinket 3v/12mhz at the end of a data cable (the same cable I use to transfer data from my phone)

I have a bi-color LED between pins 6 & 8.
Push button switches pulling to ground on pins 3 &4.

Trying to load ANY code via the USB will fail.

Arduino 1.6.7 IDE settings:
I have the board set to 3v/12mhz pro trinket.
The programmer set to USBtiny ISP.
No port detected.

I plug the board in to the USB and after a few seconds, I see the red led start to fade in and out.
I press the reset button, then click UPLOAD on the IDE.
It appears to find the trinket on Port 3, but the error shown before is what is returned and no program is loaded.

Is that any clearer? Sorry if it was muddy before.

juliemac
 
Posts: 9
Joined: Mon Jan 27, 2014 8:50 pm

Re: Pro trinket programming failure

by adafruit_support_jarek on Fri Nov 11, 2016 4:17 pm

It sounded like the Trinket has some sort of interfering hardware attached to it that only kicks in after a Read is initiated, a picture would help show that :)

According to ( https://learn.adafruit.com/introducing- ... rduino-ide ), if the Red LED is already pulsing, you shouldn't need to press the Reset button again. Can you try just plugging in the Trinket, waiting for the Red LED to begin pulsing, and uploading the code without pressing the Reset button please?

adafruit_support_jarek
 
Posts: 324
Joined: Tue Nov 08, 2016 11:48 am

Re: Pro trinket programming failure

by juliemac on Sat Nov 12, 2016 7:46 pm

Ok. I tried a button control code with one led..
Setting the Arduino IDE as before I tried uploading the code again. This is the result.
<response>
avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : usb
Using Programmer : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\\.\libusb0-0001--0x1781-0x0c9f
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 : USBtiny
Description : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.06s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: Using SCK period of 10 usec
avrdude: reading input file "C:\Users\Julie\AppData\Local\Temp\build08bd108c3d57e9eac2020337c8368fec.tmp/SimpleOnOff.ino.hex"
avrdude: writing flash (1392 bytes):

Writing |
avrdude: error: usbtiny_send: (expected 128, got -5)
####avrdude: 1 retries during SPI command
avrdude: 2 retries during SPI command
avrdude: 1 retries during SPI command
avrdude: 1 retries during SPI command
avrdude: 1 retries during SPI command
avrdude: 1 retries during SPI command
avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
####avrdude: 1 retries during SPI command
###avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
##avrdude: 1 retries during SPI command
###avrdude: 1 retries during SPI command
avrdude: 1 retries during SPI command
##avrdude: 1 retries during SPI command
###avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
####avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
##avrdude: 2 retries during SPI command
##avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
avrdude: 1 retries during SPI command
avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
##avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
avrdude: 1 retries during SPI command
#avrdude: 1 retries during SPI command
### | 100% 6.31s

avrdude: 1392 bytes of flash written
avrdude: verifying flash memory against C:\Users\Julie\AppData\Local\Temp\build08bd108c3d57e9eac2020337c8368fec.tmp/SimpleOnOff.ino.hex:
avrdude: load data flash data from input file C:\Users\Julie\AppData\Local\Temp\build08bd108c3d57e9eac2020337c8368fec.tmp/SimpleOnOff.ino.hex:
avrdude: input file C:\Users\Julie\AppData\Local\Temp\build08bd108c3d57e9eac2020337c8368fec.tmp/SimpleOnOff.ino.hex contains 1392 bytes
avrdude: reading on-chip flash data:

Reading | ###############################avrdude: 1 retries during read
################### | 100% 0.11s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0008
0xff != 0x0c
avrdude: verification error; content mismatch

avrdude done. Thank you.
</response>

juliemac
 
Posts: 9
Joined: Mon Jan 27, 2014 8:50 pm

Re: Pro trinket programming failure

by adafruit_support_jarek on Sun Nov 13, 2016 2:13 am

I managed to recreate the issue on my Trinket by purposefully corrupting the bootloader, and I rescued it by uploading code once to the Trinket using an FTDI cable, which reinstalled the bootloader. If you have an FTDI cable, can you try uploading the Blink sketch using the Pro Trinket 3V (FTDI) option in the board menu? Otherwise, please email support@adafruit.com with your order number and reference this thread, and they should get a replacement out to you shortly.

adafruit_support_jarek
 
Posts: 324
Joined: Tue Nov 08, 2016 11:48 am

Re: Pro trinket programming failure

by juliemac on Sun Nov 13, 2016 12:04 pm

Ok. That worked. I was able to load a script to turn an LED on and off by button click.
Now, when I try to reload it with the whole code, I press reset and wait for the led to fade in & out, it never does it just blinks 4 times then out.
Below is the response code from the log.
Thanks!

<log>

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM7
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x60
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x60
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x60
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done. Thank you.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
</log>

juliemac
 
Posts: 9
Joined: Mon Jan 27, 2014 8:50 pm

Re: Pro trinket programming failure

by adafruit2 on Sun Nov 13, 2016 7:23 pm

if you're trying to upload with the FTDI cable - make sure you dont click the reset button just let it try to reset the pro trinket on its own!

adafruit2
Site Admin
 
Posts: 18327
Joined: Fri Mar 11, 2005 7:36 pm

Re: Pro trinket programming failure

by juliemac on Sun Nov 13, 2016 11:28 pm

If I connect the USB cable, I can get the fade in/out. If I attach FTDI, 3 groups of 2 blinks, then out. No more connections.
I Had bought 2, so I tried it with the other one. Loaded once then can never update again.

Thanks for the help, but I am under a dead line and will use a Nano for the customers prototype.

juliemac
 
Posts: 9
Joined: Mon Jan 27, 2014 8:50 pm

Re: Pro trinket programming failure

by adafruit2 on Mon Nov 14, 2016 12:59 am

can you make sure you've got everything set up as in here
https://learn.adafruit.com/introducing- ... using-ftdi
if you still cant upload with FTDI cable and the settings documented, plz post a pic!

adafruit2
Site Admin
 
Posts: 18327
Joined: Fri Mar 11, 2005 7:36 pm

Re: Pro trinket programming failure

by juliemac on Mon Nov 14, 2016 3:34 pm

Got it. On the diagram of the trinket, you mark the DTS as Reset and the CTS as ground...
Works now.
Many thanks.

juliemac
 
Posts: 9
Joined: Mon Jan 27, 2014 8:50 pm

Re: Pro trinket programming failure

by kseto on Thu Jan 19, 2017 6:10 pm

Hi I'm also having difficulty with my Pro Trinkets. One of the two that I ordered does not run the bootloader at all (the red LED does not light when I plug it in or press the button). The second of the two was functioning ok yesterday, but after a while it was clear some code was not implementing properly upon start up, and today the bootloader is not functioning properly (the red LED triple blinks for about 5 seconds and then turns off and I'm getting a "Could not find USPtiny device" error. Help please?

EDIT: I tried attaching a resistor between the RX and 5V pins but that had no effect on either board.

kseto
 
Posts: 3
Joined: Thu Jan 19, 2017 6:02 pm

Please be positive and constructive with your questions and comments.