Arduino IDE won't upload script to Trinket Pro

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
b1g0af
 
Posts: 3
Joined: Thu Aug 03, 2017 4:21 pm

Arduino IDE won't upload script to Trinket Pro

Post by b1g0af »

I know similar issues have been posted hundreds of times, but I I've not seen this question asked: Is it at all possible that some combination of short circuits between GPIO pins could be causing the upload problem?

I have several 3v Trinket Pros. 1 of which the Arduino IDE will not upload sketches to. Because I am an idiot, the board is already soldered onto headers and a LiPo backpack which is all soldered onto a project board with lots of other components. I should've tested the board before soldering... lesson learned.

I did a lot of continuity testing while soldering up the project, so I think it's unlikely that I have any issues with shorts, but I just need to know if that would even cause a problem uploading sketches before I spend the time desoldering the Trinket Pro from the headers to swap in a different Trinket Pro.

Mac OS X 10.12.6 (Sierra). Arduino IDE v1.8.1. Adafruit AVR boards package 1.4.9.

Here's the verbose output from the upload attempt:

Code: Select all

Sketch uses 2400 bytes (8%) of program storage space. Maximum is 28672 bytes.
Global variables use 28 bytes of dynamic memory.
/Users/mattsmith/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C/Users/mattsmith/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -cusbtiny -Uflash:w:/var/folders/6y/ksncl3kj5_5ghrl9cj04yysc0000gn/T/arduino_build_366693/sketch.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/mattsmith/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf"
         User configuration file is "/Users/mattsmith/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 020:004
         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.00s

avrdude: Device signature = 0x1e950f (probably m328p)
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 "/var/folders/6y/ksncl3kj5_5ghrl9cj04yysc0000gn/T/arduino_build_366693/sketch.ino.hex"
avrdude: writing flash (2400 bytes):

Writing | 
avrdude: error: usbtiny_send: Operation timed out (expected 128, got -60)
##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
#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: 1 retries during SPI command
## | 100% 26.79s

avrdude: 2400 bytes of flash written
avrdude: verifying flash memory against /var/folders/6y/ksncl3kj5_5ghrl9cj04yysc0000gn/T/arduino_build_366693/sketch.ino.hex:
avrdude: load data flash data from input file /var/folders/6y/ksncl3kj5_5ghrl9cj04yysc0000gn/T/arduino_build_366693/sketch.ino.hex:
avrdude: input file /var/folders/6y/ksncl3kj5_5ghrl9cj04yysc0000gn/T/arduino_build_366693/sketch.ino.hex contains 2400 bytes
avrdude: reading on-chip flash data:

Reading | ############################################the selected serial port Reading | ############################################ does not exist or your board is not connected
###### | 100% 0.11s

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

avrdude done.  Thank you.

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Arduino IDE won't upload script to Trinket Pro

Post by adafruit_support_carter »

Is it at all possible that some combination of short circuits between GPIO pins could be causing the upload problem?
Yes. But unfortunately same could be said for any project. Specifics would depend on setup. Can you post a photo of your setup showing all connections.

User avatar
b1g0af
 
Posts: 3
Joined: Thu Aug 03, 2017 4:21 pm

Re: Arduino IDE won't upload script to Trinket Pro

Post by b1g0af »

I could, but I don't think it would be useful. I had this breadboarded up and working with another Trinket Pro, so it's not a design problem. Should I just bite the bullet and swap out the Trinket Pro for another one (UGH!) and see if that fixes the problem?

User avatar
b1g0af
 
Posts: 3
Joined: Thu Aug 03, 2017 4:21 pm

Re: Arduino IDE won't upload script to Trinket Pro

Post by b1g0af »

Here's a screenshot of the layout in case you find this helpful. Obviously, imagine a Trinket Pro in place of the Arduino. In place of the piezo, an Adafruit Audio FX Min Sound Board and Adafruit Mono Class D Audio Amplifier. The 3v coin cell represents the LiPo pack (the LiPo Backpack is not represented, but I have it soldered to the Trinket Pro).

Thank you so much for any insight!
Project.png
Project.png (158.8 KiB) Viewed 962 times

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Arduino IDE won't upload script to Trinket Pro

Post by adafruit_support_carter »

Yeah, there's a lot going on. If the Trinket worked before you incorporated it into your setup (always a good idea) and then it stopped afterwards, then you know it's something there. To troubleshoot at this point you would need to systematically go through and test things.

You're suggesting swapping out Trinkets, so sounds like you're able to desolder the existing one. Maybe you could try that and see if it works stand alone.

Also, photos of the real setup tend to have a way to show realities that circuit sketches don't. For example:
In place of the piezo, an Adafruit Audio FX Min Sound Board and Adafruit Mono Class D Audio Amplifier.
How are these connected and how are they being powered?

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”