Hacking Adafruit Trinket M0 problem

  • Thread starter Thread starter johnybjb
  • Start date Start date
  • Views Views 10,458
  • Replies Replies 52
The soldering on the fine pitch USB-C end of mine is pretty janky, I was considering that may be the issue before I logged on here and saw other ppl saying theirs was okay before they tried to update the payload.
I doubt it, this appears to be a very common issue. If you can't get it working, your best bet is to pull out the soldering iron and force it into "debug" mode.

If you have the tools for soldering, what's stopping you from buying a Trinket or a SwitchMe and installing that? I'm waiting for a SwitchMe, it'll be a much cleaner solution than an external dongle, or what I currently have!
 
What package is the Atmel on the thing? Is an E(32 pin) or a G(48 pin) QFN/QFP, you should be able to hook up to pin 31/32 SWCLK/SWDIO and reflash a bootloader, no? Even if not broken out, you can go straight onto the package and OpenOCD something that isn`t crap on to there.
 
  • Like
Reactions: Huntereb
What package is the Atmel on the thing? Is an E(32 pin) or a G(48 pin) QFN/QFP, you should be able to hook up to pin 31/32 SWCLK/SWDIO and reflash a bootloader, no? Even if not broken out, you can go straight onto the package and OpenOCD something that isn`t crap on to there.
High-res of the board, straight from the creator's Github.
hardware_fix.jpg
 
I doubt it, this appears to be a very common issue
Yes, I didn't know that before I came here and seen all the posts regarding this, is what I meant.

I was in a similar situation, but after flashing it eventually popped up as a storage device on my PC
We can't flash ours, the chip reboots too fast to even get a serial link. The seller included a paper with a link to a github repo (link is in OP), on the github repo it says to remove a resister to force the chip into bootloader flash mode, but I think it may be possible to short the resistor (or possibly one of the very fine pitch pins on the chip itself with a tiny needle or something I'm looking at the SAMD21 datasheet (http://www.farnell.com/datasheets/1807566.pdf) right now exploring that possibility). When I get back to my desk I will try to short the resistor first though.

If you have the tools for soldering, what's stopping you from buying a Trinket or a SwitchMe and installing that?
Nothing, I'm just having fun with it, and maybe try to help out the rest of the folks in this thread. I have all kinds of arduinos etc around. I'm thinking about making an ESP8266 based dongle so can do stuff like update and swap payloads via wifi or bluetooth in the future
 
Last edited by DayVeeBoi,
  • Like
Reactions: Huntereb
Yes, I didn't know that before I came here and seen all the posts regarding this, is what I meant.

We can't flash ours, the chip reboots too fast to even get a serial link. The seller included a paper with a link to a github repo (link is in OP), on the github repo it says to remove a resister to force the chip into bootloader flash mode, but I think it may be possible to short the resistor (or possibly one of the very fine pitch pins on the chip itself with a tiny needle or something I'm looking at the SAMD21 datasheet (http://www.farnell.com/datasheets/1807566.pdf) right now exploring that possibility). When I get back to my desk I will try to short the resistor first though.


Nothing, I'm just having fun with it, and maybe try to help out the rest of the folks in this thread. I have all kinds of arduinos etc around. I'm thinking about making an ESP8266 based dongle so can do stuff like update and swap payloads via wifi or bluetooth in the future

Well...

Phew! Looking at that... Overly complicated for what it is.

What is that crystal doing at PA01? Bugger-all by the looks of it.

First off, start by checking voltage at pin 44. (should be no more than 3.6v stable), then the one next to it (43). Should be no more than 1.8.

If these are correct and stable, that means the OTT smoothing in the thing seems to be working and it is a problem with the SAMD.

If not stable, it is jumping around, or oscillating... Just a hunch... Disconnect that crystal. and connect the battery+ straight to pin 44 (ideally to the cap just before it)

Sidenote: Why didn`t they just use a QFN/P E18? No crystal needed. For charging the batt a TP4056 maybe?

EDIT: Looks like the crystal is in the right place. Microchips datasheet has fubar`d the colour code to the chip. PA00 and PA01 on their datasheet are coloured as reset pins! Prats.

--------------------- MERGED ---------------------------

Untitled.png
 
Last edited by mattytrog,
First off, start by checking voltage at pin 44. (should be no more than 3.6v stable), then the one next to it (43). Should be 1.8.
At pin 44 I am getting ~3.0x oscillating to ~2.5x that seems to be in sync with the flashing LED (there's 2 one that indicates on/off I assume and the other one seems to be activity. The red one is solid and the yellow one flashes around 1/second in sync with the boot loop). Pin 43 is a solid 1.2v

I'm gonna pack it in for the night as well I think, I don't have great lighting so the windows help a lot and its starting to get dark now. Thanks for your help/suggestions, and hope to hear from you tomorrow.
 
Last edited by DayVeeBoi,
OK. You need to try the battery connected to pin 44. It is a 3v LiPo I guessing...

See if it then works. If it does, then we are getting there.

--------------------- MERGED ---------------------------

This is the same device I was able to install internally after removing the USBA and USBC from each side.


I was in a similar situation, but after flashing it eventually popped up as a storage device on my PC (The original expected behavior), and I was able to copy a uf2 to it without issue.

This device is a little too big for internal installation... And the firmware is not made to allow for updating of payloads over the Switch's USB C, just that USBA. @mattytrog are the pins leading to the USBs from the controller the same for every Trinket clone? Would flashing a payload such as the one created by you for the original Trinket M0s conflict in any way? I assume its flashed with a bootloader that tells the device which pins go to what, uncertain how these things work.

Well, it is a G18 chip inside this thing. So I`d test the itsybitsy version of one of my sender UF2s

The E18(32 pin as used in Trinket or Gemma) doesn`t need a crystal.

But yes. The USB host pins are the same.
 
  • Like
Reactions: Huntereb
I have the same dongle but I do not update it from preinstalled sx payload. I decided to convert other payloads to boot.dat using CTCaer's script and use it as is.
 
OK. You need to try the battery connected to pin 44. It is a 3v LiPo I guessing...

See if it then works. If it does, then we are getting there.

Well looks like you were on the right track anyways. I checked the voltage of the LiPo (I know it's the first thing I should've done) and it is only at <2.5v so I charged it overnight and it is still at the same voltage so I think it's safe to assume the chip is browning out. I'm wondering if plugging the USB-A into a computer is breaking something where plugging it into a charger doesn't hurt it because there's never anything over the USB data pins.

@duckbill007 have you ever plugged yours into a computer and if so have you tried to communicate with it using Arduino App or something similar?
 
Well looks like you were on the right track anyways. I checked the voltage of the LiPo (I know it's the first thing I should've done) and it is only at <2.5v so I charged it overnight and it is still at the same voltage so I think it's safe to assume the chip is browning out. I'm wondering if plugging the USB-A into a computer is breaking something where plugging it into a charger doesn't hurt it because there's never anything over the USB data pins.

@duckbill007 have you ever plugged yours into a computer and if so have you tried to communicate with it using Arduino App or something similar?

No. More than likely, its a shit LiPo battery. If it is flat, it will be creating a load, rather than helping the circuit. If the lipo is taking all the juice into oblivion, no wonder its oscillating.

Disconnect the bat and give it a go. See if it bootloops.
 
I meant to say you're right there's no bootloop now that I took the battery off. I am thinking that it's the recharging circuit that's no good
If its dropping like a sack of shit with the batt connected, something is going in the battery. My money is on the manky LiPo cell fubar

:)
 
sorry I wasn't clearer. I only have one hand to type well with (I injured the other a while back) so it's hard to type and work and I just hammered that out quickly
 
  • Like
Reactions: mattytrog
No worries! I was actually entertained.

That would be something I`d say to my other half.

A bit like "It hurts when I laugh"... "Don`t f*cking laugh then"...
 
The charging circuit for this is a tiny board attached to the battery. I haven't disassembled it yet but I can see 2 6 pin DIP smd on it. I guess I should try another battery, I have quite a few I know are good. I don't have like a bench power supply or anything, I usually use a rechargeable battery pack for 5v but I have quite a few 250 and 500mah LiPo's around.
 
Last edited by DayVeeBoi, , Reason: Meant to say dip not pic
I`d take the opportunity to stick a 4056 and a 250mAh LiPo in it.

It is VASTLY overcomplicated for what it is. I mean, they even have an inductor attached to that (what looks like) LDO. Talk about overkill. Shame they put such a crap cell in it.
 

Site & Scene News

Popular threads in this forum