Tutorial  Updated

Trinket Internal Install.

Here's A Guide To Installing The Trinket M0 Into The Switch.

Program The Trinket Before You Remove The Usb Port, Saves You Doing It After You Complete The Install.

First Thing To Do Is Remove The Usb Port From The Trinket, If You Have A Hot Air Wand Then Use That To Remove The Port It Will Reduce The Risk Of Damage To The Pads.

usb intact.jpg


Now That The Usb Port Has Been Removed You Want To Solder Wire To The Data Pads, White = Data- And Green Data+ In This Guide.

Now Solder Wire To The Bat Pad = Red, Gnd Pad = Black, Pad 4 = Orange & Pad 3 = Brown In This Guide.

Also Remove The Resistor Next To The Ppower Led Mark Out In Purple In This Guide.
Trinket Points.jpg


When You Have The Trinket All Prepared, You Can Now Proceed To The Install To The Switch.
trinket install points.jpg


Once The Install Is Completely Done Then Clean Up The Points You Have Soldered To Using Isopropyl And Cotton Buds/Q-Tips.
Finished.jpg



Alternative Point For Pad 4.

Altternative Pad 4 Point.jpg


Alternative Points For Joycon Rail Pin 10.

If You Decide On Using This Alternative Point Then Use Enamel Coated Jumper Wire 0.10mm.

Alt Joycon Rail Pin 10 Point.jpg


Remember Take Your Time It's Not A Race lol. Rushing Can Lead To Mistakes.

Tools Required.

Kynar Wire 30 AWG.
Soldering Iron.
Hot Air Wand For Usb Port Removal(Optional)
Isopropyl.
Cotton Bud/Q-Tips.
Flux.
Solder.
Enamel Jumper Wire (Optional)


Thanks And Credit Goes To Xboxexpert For This Solution.

I Think That Covers Everything.

EDIT..

here's another method for the install of the trinket, this method does away with the pad 4, as some may find it tricky to solder to the cap used on the mobo.

the rst pad is used instead and the wire is linked to the power button, Also this has a bonus that you can double press the power button to put the trinket into boot loader mode for uploading a new payload.

of course you don't have to use the rst pad at all, you can't just press power button and volume up button, then press reset button for rcm mode.

this method should be ok for the novices.

install at your own risk.

another install.jpg


the pad on the power button to use.

power button point.jpg


i have one more method to try but I really think this one is not to bad method.

the more methods the better I say, of course to try and make it as easy as possible for pros and novices.

EDIT...
another method for the install of the trinket.

this method is basically same as all other methods, just a different points uses for the bat pad and rst pad.

this install will allow you to have the trinket power off when you fully power off the switch.

double press the reset button on the trinket to get into boot loader mode, this may take a couple of attempts to do.

the payload that you use already will work with this method no need for new ones.

here's the diagram for method 3, you could possibly have this as a 4 wire install, if you install auto rcm mode, but as my sd card module port is buggerd I couldn't test that out.

twinket power off.jpg


ok it seems method 3 needs auto rcm installed for it to work without the need to use the rst pad

so for them that don't want to use auto rcm mode then solder a wire from rst pad to the point on the power button, and use pad 3 to the pin 10 on the joycon rail or one of the alt points on mobo.

beware the alt points are small so use at your own risk.

ok anyone with changing issues test these 2 points, you should get 5v on the usb port side, and around 3.2v on the switch side.

if your getting the volts on the switch side that are fluctuating up & down then replace the part with the v on top it's a diode, you want one that fits so the actual size is either 0402 or 0603 in dimension (i'm using 0402/0603 as an example for size purpose only)

around page 16 has more info about this component..

dont come moaning if you damage your console doing this install, i'm not responsible for you opening or taking a soldering iron to your console.
you do this at your own risk any damage is down to yourself.


charger_issue_volts.jpg


another thing if your trinket starts to get very hot to the point you can't touch it, then the atmel ATSAMD21E18A-U ic is on it's way out, so you will need to replace the ic or just replace your trinket.

at some point it wont power up after this has happened.
1 = gets very hot.
2 = reset starts to become tempermental .
3 = dead
4 = fix replace the atmel ATSAMD21E18A-U ic

edit

added uf2 drag and drop files for r4 trinket gemma dongles or for a 4 wire internal install.

atmosphere
hekate 4.2
Sxos
rajnx
reinx
 

Attachments

  • Trinket All In One.jpg
    Trinket All In One.jpg
    123.9 KB · Views: 4,027
  • Trinket-R4-Gemma-D&D-Files.zip
    421.3 KB · Views: 574
Last edited by M-O-B, , Reason: added updated uf2 file.

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
Removed the shorted cap and switch now boots.

just replace the cap then your good to go. if I remember correctly it won't work via the dock without that cap.

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

Hi can you create step by step guide how to make the usb dongle?

this will do you.
Trinket_Dongle_v3.jpg
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
@frep,

I got around to flashing the samd21 chip with the raspberry pi using openocd - it flashes ok, no need to use any capacitors for flashing. I've posted a diagram how to connect to the old raspberry pi 1(v2). The sam21 can just be connected - you only need to use one GND and two 3.3v points, reset + swdclk and swdio

ea1bg6.jpg


65qw5s.jpg


I'll be able to start messing with the bootloaders now :-)
 
Last edited by mrdude,

frep

Well-Known Member
Newcomer
Joined
Jul 7, 2018
Messages
52
Trophies
0
Age
42
XP
474
Country
Switzerland
@frep,

I got around to flashing the samd21 chip with the raspberry pi using openocd - it flashes ok, no need to use any capacitors for flashing. I've posted a diagram how to connect to the old raspberry pi 1(v2). The sam21 can just be connected - you only need to use one GND and two 3.3v points, reset + swdclk and swdio

ea1bg6.jpg


65qw5s.jpg


I'll be able to start messing with the bootloaders now :-)

Nice done! It seems that the second power connection stabilize the supply enough! Good idea!
I soldered yesterday another board together, but I must had a shortcut, I didn’t noticed, while soldering the m0. :-( So sadly, it’s not working. I try to get another one done tomorrow. (With checking for shorts more often during the soldering)
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
@frep

Disconnect your board for at least an hour and then use a multimeter to check all adjacent pins - I found that when you check the board before wiring to anything - I didn't have any shorts, then when connecting to power and unplugging again - when checking with a multimeter again - 3.3v and gnd were shorted on pins 5+6, 17+18, 35+36, 42+44. Even though they weren't actually shorted - the chip internally shorted them. When the chip is cold/discharged - these shorts disappeared.

Solution: Prior to flashing the bootloader - double check all the connections, use caps to be on the safe side to prevent data being corrupted during flashing. Also supply 3.3v to pins 17+44. Use capacitor between pins 42+43. Once the bootloader is flashed for the first time - you can wire as the diagram above (in my previous post), for further flashing.

I had the same problem as you - even though the soldering was perfect.
 
Last edited by mrdude,

olku

Well-Known Member
Newcomer
Joined
Oct 31, 2015
Messages
72
Trophies
0
Location
Estonia
XP
505
Country
Estonia
just replace the cap then your good to go. if I remember correctly it won't work via the dock without that cap.
Everything is working as it should without this cap, dock works with charging.
Strange thing is that diode still reads 5v on both sides with usb connected to pc and over 14v with switch charger connected.
 

frep

Well-Known Member
Newcomer
Joined
Jul 7, 2018
Messages
52
Trophies
0
Age
42
XP
474
Country
Switzerland
@frep

Disconnect your board for at least an hour and then use a multimeter to check all adjacent pins - I found that when you check the board before wiring to anything - I didn't have any shorts, then when connecting to power and unplugging again - when checking with a multimeter again - 3.3v and gnd were shorted on pins 5+6, 17+18, 35+36, 42+44. Even though they weren't actually shorted - the chip internally shorted them. When the chip is cold/discharged - these shorts disappeared.

Solution: Prior to flashing the bootloader - double check all the connections, use caps to be on the safe side to prevent data being corrupted during flashing. Also supply 3.3v to pins 17+44. Use capacitor between pins 42+43. Once the bootloader is flashed for the first time - you can wire as the diagram above (in my previous post), for further flashing.

I had the same problem as you - even though the soldering was perfect.

Hey MrDude
The short persists, but I think I have to blame my soldering... Although the pins look okay, it might be, that the pads under the pins could have a short (hard to see).
Anyway, since I have enough parts, I soldered another board. I have to say, I'm getting better at soldering these damn 48-TQFP chips! I used A LOT of flux, and it helped a lot. :-D
This time, no short and flashing of the bootloader worked again like a charm.

One small question about your wiring diagram of the raspberry pi and the trinket (which I like, by the way):
You connected the the 3.3V pin of the raspberry with the bat pin of the trinket. Why not using the 3V pin of the trinket?
 
  • Like
Reactions: mrdude

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
Hey MrDude
The short persists, but I think I have to blame my soldering... Although the pins look okay, it might be, that the pads under the pins could have a short (hard to see).
Anyway, since I have enough parts, I soldered another board. I have to say, I'm getting better at soldering these damn 48-TQFP chips! I used A LOT of flux, and it helped a lot. :-D
This time, no short and flashing of the bootloader worked again like a charm.

One small question about your wiring diagram of the raspberry pi and the trinket (which I like, by the way):
You connected the the 3.3V pin of the raspberry with the bat pin of the trinket. Why not using the 3V pin of the trinket?

Just incase of a power surge from the ri-pi, connecting to the Bat makes the electrons travel though a diode first so it protects the trinket from reverse polarity, then it goes though the voltage regulator so no chance of damaging the trinket if the voltage goes over 3.6v. The samd21 can operate at less than 2 volts, so even the slight voltage drop going past the diode does not impact the operation, and wiring that way provides a level of safety.

Hope that answers your question. If not please let me know and I'll try and be more specific.

Also, if you're going to use a raspberry pi v1 - this uses a different config file for dumping/flashing due to only working at 700Mhz compared to the faster raspberry pi 2 - have a look in your interfaces folder for the configs and you'll see the differences - I can post those configs if you need them.
 
Last edited by mrdude,
  • Like
Reactions: frep

frep

Well-Known Member
Newcomer
Joined
Jul 7, 2018
Messages
52
Trophies
0
Age
42
XP
474
Country
Switzerland
@mrdude
I see, why the bat pin is better!

I have here the "assembly" plan and the wiring diagram of chip. Could you double check the wiring diagram? Especially the buttons, I'm unsure. I think, the trace which connects the tree buttons is the ground line, so I have to solder on the other side of the button, which should be floating...

switchM0D_assembly.jpg SwitchWiring2.jpg
 
  • Like
Reactions: mrdude

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
@mrdude
I see, why the bat pin is better!

I have here the "assembly" plan and the wiring diagram of chip. Could you double check the wiring diagram? Especially the buttons, I'm unsure. I think, the trace which connects the tree buttons is the ground line, so I have to solder on the other side of the button, which should be floating...

View attachment 138541 View attachment 138542

Everything looks good - I haven't taken my switch apart before - but I guess the reset pin goes to ground when you press the v- button (you could put a multimeter on to ground and then press the vol - button to see if you get continuity, that will prove that's correct. As for power and v+, I imagine when you need to connect the side that doesn't have any voltage until you press the button. If you ask M.O.B - he could check for you. Everything else looks good though - so I can't see any problems. I thought you already tried with a breadboard first? maybe I imagined you said that :-).
 
Last edited by mrdude,

frep

Well-Known Member
Newcomer
Joined
Jul 7, 2018
Messages
52
Trophies
0
Age
42
XP
474
Country
Switzerland
Everything looks good - I haven't taken my switch apart before - but I guess the reset pin goes to ground when you press the v- button (you could put a multimeter on to ground and then press the vol - button to see if you get continuity, that will prove that's correct. As for power and v+, I imagine when you need to connect the side that doesn't have any voltage until you press the button. If you ask M.O.B - he could check for you. Everything else looks good though - so I can't see any problems. I thought you already tried with a breadboard first? maybe I imagined you said that :-).
@mrdude
Thanks! Yeah, I tried the circuit on the breadboard, and I will double check it there with the pcb. However, I assumed there, that all three buttons are floating, and go to ground once they are pressed. But true, it is fast checked with a multimeter, once the switch is open.
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
@mrdude
Thanks! Yeah, I tried the circuit on the breadboard, and I will double check it there with the pcb. However, I assumed there, that all three buttons are floating, and go to ground once they are pressed. But true, it is fast checked with a multimeter, once the switch is open.

Yes you're correct, I just remembered you used pnp transistors - doh!, so as long as those points are going to ground everything should work fine.
 

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
We should team up on our install threads :)

yeah I don't mind seeing as it's more or less same thread, I don't see point in multiple threads that cover the same thing.

I really only made this one coz I didn't see one in this section, but then I probably didn't look hard enough
 

mattytrog

You don`t want to listen to anything I say.
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
yeah I don't mind seeing as it's more or less same thread, I don't see point in multiple threads that cover the same thing.

I really only made this one coz I didn't see one in this section, but then I probably didn't look hard enough
It wasn't. It was in back up loaders and modchips
:)
 

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
was thinking about the dongle code by noenu, and using it as internal but the led would flash continuous when ofw was loaded, but cfw the led would be black out or off which ever term you wanna use.

so I've added a few lines from another code, and set the led to black.

how it should work is ofw no leds are on at all apart from the green power led unless you remove it.

now when you load cfw the led will flash green for a successful load.

for the rcm mode I have a 10k resistor between pad 7 & pad 10 inside the right joycon.

if this worked out like it does for the dongle then it would only be 4 wire install, no auto rcm mode, or you could have auto rcm mode.

now my idea is to have the led on and not black out like it is at moment, so it flash red for ofw then leds off, and for cfw flash green or whatever colours you rather use.

using one of the points for the bat pad on the trinket will power off/on the trinket, so no reset of the trinket would be needed, bit like in this video when dongle is flashed with the edited code.



this is just a idea I'm not gonna say it works as I've not tested it myself yet, so I wouldn't recommend trying it till I have got the time to fit and test it.

maybe this is already been posted but I've not searched or looked to check.

the ino and uf2 drag and drop file are based on the original code by noenu.

https://github.com/noemu/sam-fusee-launcher
 
Last edited by M-O-B,

mattytrog

You don`t want to listen to anything I say.
Member
Joined
Apr 27, 2018
Messages
3,708
Trophies
0
Age
48
XP
4,328
Country
United Kingdom
was thinking about the dongle code by noenu, and using it as internal but the led would flash continuous when ofw was loaded, but cfw the led would be black out or off which ever term you wanna use.

so I've added a few lines from another code, and set the led to black.

how it should work is ofw no leds are on at all apart from the green power led unless you remove it.

now when you load cfw the led will flash green for a successful load.

for the rcm mode I have a 10k resistor between pad 7 & pad 10 inside the right joycon.

if this worked out like it does for the dongle then it would only be 4 wire install, no auto rcm mode, or you could have auto rcm mode.

now my idea is to have the led on and not black out like it is at moment, so it flash red for ofw then leds off, and for cfw flash green or whatever colours you rather use.

using one of the points for the bat pad on the trinket will power off/on the trinket, so no reset of the trinket would be needed, bit like in this video when dongle is flashed with the edited code.



this is just a idea I'm not gonna say it works as I've not tested it myself yet, so I wouldn't recommend trying it till I have got the time to fit and test it.

diagram for the install.
View attachment 138944
maybe this is already been posted but I've not searched or looked to check.

the ino and uf2 drag and drop file are based on the original code by noenu.

https://github.com/noemu/sam-fusee-launcher


You will see some lines that control sleep.

Void sleep (into errorcode)...

Sleep -1= success
Sleep 1 = fail.

I had the fail going to a white led. As you could either tell if you were in RCM or not as the trinket is powered from a switched line.
 
  • Like
Reactions: M-O-B

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
You will see some lines that control sleep.

Void sleep (into errorcode)...

Sleep -1= success
Sleep 1 = fail.

I had the fail going to a white led. As you could either tell if you were in RCM or not as the trinket is powered from a switched line.

I'll take a proper look later at the code later.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/MddR6PTmGKg?si=mU2EO5hoE7XXSbSr