Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Trinket 3.3v Bootloader Problem
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trinket 3.3v Bootloader Problem

by rlahoda on Wed Jun 10, 2020 8:36 pm

I'm having a problem with my bootloader on my Trinket 3.3v. For a while I was able to work with it just fine, uploading my code and making changes. I was adding connections for the Neopixel strip I was going to use it to control and everything was working correctly. I had a couple buttons that were working fine as well.

At some point, though, I went to power it up and the red LED that normally would light up when starting didn't light up. The sketch loaded on it worked fine, but the LED didn't light. I pressed the Reset button and it did not start pulsing to indicate it was in bootloader mode.

Since then I have been unable to get it to load any code.

I found the instructions for repairing the bootloader so I decided to follow it. I added the appropriate connections to the Trinket. I don't have an FTDI breakout so I had to use my Arduino Mega instead.

The directions from the bootloader page say to wire it this way:
Code: Select all | TOGGLE FULL SIZE
    Trinket VBAT+ pin to Arduino 5V (or just power it via a battery or USB cable)
    Trinket GND pin to Arduino GND
    Trinket RST to Arduino #10
    Trinket #0 pin to Arduino #11
    Trinket #1 pin to Arduino #12
    Trinket #2 pin to Arduino #13

However I have an Arduino Mega so that layout won't work for me.

I found this page detailing the SPI interface variations for different boards: https://www.arduino.cc/en/Reference/SPI and using that I transposed this way:

Code: Select all | TOGGLE FULL SIZE
Trinket Gnd -> Mega Gnd
Trinket Batt -> Mega 5v
Trinket Rst -> Mega 53
Trinket #0 (MOSI) -> Mega 51
Trinket #1 (MISO) -> Mega 50
Trinket #2 (SCK) -> Mega 52


When I tried the bootloader sketch the response I got was:
Code: Select all | TOGGLE FULL SIZE
Type 'G' or hit BUTTON for next chip
Starting Program Mode [OK]

Reading signature:0
  (no target attached?)
Signature fail


I tried a few different things to see if something was wired wrong.

- Redefined MISO and MOSI in the Arduino sketch to be reversed (MISO as 51 and MOSI as 50)
- Redefined RESET in the Arduino sketch as 10 and moved the wire on the Mega to 10
- Swapped wires between Mega pins 50 and 51.

Nothing changed during any of these.

I don't know what else to try. Looking around the forums at other people's posts who had the same or similar issues, there doesn't seem to be a clear solution for this so I'm not sure what else to try.
IMG_4783a.JPG
Trinket attached to Mega2560
IMG_4783a.JPG (346.52 KiB) Viewed 42 times

rlahoda
 
Posts: 3
Joined: Sun Feb 09, 2020 10:33 am

Please be positive and constructive with your questions and comments.