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,028
  • Trinket-R4-Gemma-D&D-Files.zip
    421.3 KB · Views: 576
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
If you need any help with code, give me a shout. I've added multiple payloads to the Sam fusee launcher. Chosen by shorting a wire.

It's fun stuff!

I only need to try get the led to black out once ofw is booted like it does with cfw.

I'm just missing something for the led to not light up once ofw has booted.

 

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
I only need to try get the led to black out once ofw is booted like it does with cfw.

I'm just missing something for the led to not light up once ofw has booted.



It's all about timing.

You have sleep int error code going red, delay then black, yes?

Copy the led confirm time to above the setLedColor("red").
So you want... I'm paraphrasing here

Delay microseconds
Setledcolor red
Delay microseconds
Setledcolor black
...
 

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 everything seems to be correct well what I have changed anyway.

I've even changed the void sleepDeep to void sleep.

View attachment 139013

everything cfw side seems to work as I want it, it's just the ofw side that's not doing as I want.

maybe I'm missing something in the main tab for the setup.

View attachment 139014

I can always change orange to black then the led is off, that will do for time being till I get the time to install.

Tell you what...

Try a file from my thread. Just to test. I think you have the trinket powered all the time. Ie method 3 in my thread. Oops... It's external...

If external, try any file.

I'm viewing this from a mobile phone and I need the laptop to have a good look at your code.

Go to the other thread and download the legacy method 3 file. Just to test to see if that one works.

We will get your code sorted. I'd like to help if poss

:)
 
Last edited by mattytrog,

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
Tell you what...

Try a file from my thread. Just to test. I think you have the trinket powered all the time. Ie method 3 in my thread. Oops... It's external...

If external, try any file.

I'm viewing this from a mobile phone and I need the laptop to have a good look at your code.



Go to the other thread and download the legacy method 3 file. Just to test to see if that one works.

We will get your code sorted. I'd like to help if poss

:)


I check it out in a bit.

this is best I've got so far.

it blinks for a short spell then sleep for ofw.

and cfw works as I want it.



this could have the rcm strap line added back, to make it a 5 wire install.

but it's just experiment at moment.
 

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
right I think I've got it sorted well more or less, but it's working on my dongle as I want.

think it still needs fine tuning but it's close to a 4 wire internal install without the need to use auto rcm mode. but you can still use auto rcm mode if you wanted.

one has no rcm strap pin set and the other does.

a image of how the converted bin files are setup, only one ino file needed, then just enable the one you want to use and disable the other 3.

hekate-3.2.h
sxos.h
ReiNX.h
RajNX.h



here's a test run with my dongle as I can't install to my switch at moment.


also done one that led blinks instead of static led.



if you use the cap point on the switch mobo for the bat pad then this should work the excate same as the dongle.

well in thearoy it should do.

now I have a look at mattytrog thread, see what his has that's different.

if his is excatly the same as this thread then I'll get this one closed..as it's pointless having 2 threads the same or similar.
 
Last edited by M-O-B, , Reason: removed images as I need to update

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
have revamp the codes so basically you only need one code for all payloads.

just disable the payloads you don't want to use.

as shown in the image sx os is enabled and the other 3 are disabled.

this will make it easier and less files to grab for different payloads.

Trinket dongle v1
Trinket dongle v2
Trinket internal v1


will post the new codes in OP soon, has no UF2 Files as I'm to lazy to sit doing them..

OP updated.
 
Last edited by 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
anyone want to test these out let me know if works ok as a 5 wire install. or for a dongle they are UF2 Files only.

diagram for internal install is a couple of post up

I know it works on a dongle, but I'm not sure if the pad 3 rcm strap to pin 10 on joycon rail will work.



updated UF2 Files as I missed one part out for the rcm strap..
 
Last edited by M-O-B, , Reason: Updated the UF2 Files

frep

Well-Known Member
Newcomer
Joined
Jul 7, 2018
Messages
52
Trophies
0
Age
42
XP
474
Country
Switzerland
@M-O-B I study the arduino sketch you are using to adjust it to my custom board. With your sketch in mind, I doubt that your 5 wire install will work. The problem I see is the following:
Pin 3 which is used to tie the rcm line down to ground is only set to low in the wakeup function, which will never be called, since the interrupt pin 4 is not anymore connected.
Do you agree, or have I misunderstood something? -> Possible, since I also don’t really understand your method 3 in the OP. There you say if used without aurorcm, you have to connect pin3 to rcm as well as rst pin to power button. But holding power button (reset pin of trinket) down, delays only the execution of the setup function. I don’t see how the pin3 is set to low this way.
Maybe you could help me understand that :-)
 

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
There is a q
@M-O-B I study the arduino sketch you are using to adjust it to my custom board. With your sketch in mind, I doubt that your 5 wire install will work. The problem I see is the following:
Pin 3 which is used to tie the rcm line down to ground is only set to low in the wakeup function, which will never be called, since the interrupt pin 4 is not anymore connected.
Do you agree, or have I misunderstood something? -> Possible, since I also don’t really understand your method 3 in the OP. There you say if used without aurorcm, you have to connect pin3 to rcm as well as rst pin to power button. But holding power button (reset pin of trinket) down, delays only the execution of the setup function. I don’t see how the pin3 is set to low this way.
Maybe you could help me understand that :-)

There is a quirk in the UF2 bootloader that pulls pin 3 low on hard reset. ( It should be floating). Pin 4 isn't required for a dual boot scenario as you merely hold down vol+.

We take advantage of this. At least on my thread anyway ;)

I'm experimenting with the low-level bootloader code to get it to pull pin 0 low too for an autoRCM solution with doesn't require autoRCM.

You can currently otherwise only accomplish this by having the trinket powered all of the time, so cold-boot of trinket is not possible.
 

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
@M-O-B I study the arduino sketch you are using to adjust it to my custom board. With your sketch in mind, I doubt that your 5 wire install will work. The problem I see is the following:
Pin 3 which is used to tie the rcm line down to ground is only set to low in the wakeup function, which will never be called, since the interrupt pin 4 is not anymore connected.
Do you agree, or have I misunderstood something? -> Possible, since I also don’t really understand your method 3 in the OP. There you say if used without aurorcm, you have to connect pin3 to rcm as well as rst pin to power button. But holding power button (reset pin of trinket) down, delays only the execution of the setup function. I don’t see how the pin3 is set to low this way.
Maybe you could help me understand that :-)

once I've fully recovered from my op I can get back to my work station and install a trinket into my new switch. but just can't do sod all at this moment in time.

the actual code has not been changed regarding the wake up stuff apart from the wakeup pin and vol pin stuff.

the rest is as it was in the original source.

as for method 3 it is simple enough to understand, unless it's done in a way that I only understand it and no bugger else does.

I really wouldn't bother about it tbh as I'm going to see about getting this thread closed down or removed at some point.

plenty of stuff in this thread which has similar info to this one plus probably more.

https://gbatemp.net/threads/internal-modchip-trinket-m0-gemma-m0-guide-and-files.508068/
 

frep

Well-Known Member
Newcomer
Joined
Jul 7, 2018
Messages
52
Trophies
0
Age
42
XP
474
Country
Switzerland
There is a q


There is a quirk in the UF2 bootloader that pulls pin 3 low on hard reset. ( It should be floating). Pin 4 isn't required for a dual boot scenario as you merely hold down vol+.

We take advantage of this. At least on my thread anyway ;)

I'm experimenting with the low-level bootloader code to get it to pull pin 0 low too for an autoRCM solution with doesn't require autoRCM.

You can currently otherwise only accomplish this by having the trinket powered all of the time, so cold-boot of trinket is not possible.

@mattytrog thanks for your explanation! Now it makes much more sense! :-)
Wouldn’t it be easier to set these signals (rcm@pin3 and vol+@pin0) at the beginning of the setup, delay a second and inject the payload after that? This way the bootloader could be unchanged, or is there a specific reason to handle these signals in the bootloader?
 

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
@mattytrog thanks for your explanation! Now it makes much more sense! :-)
Wouldn’t it be easier to set these signals (rcm@pin3 and vol+@pin0) at the beginning of the setup, delay a second and inject the payload after that? This way the bootloader could be unchanged, or is there a specific reason to handle these signals in the bootloader?

You can't. The trinket doesn't init fast enough before Nintendo bootloader kicks in. Unless you have trinket powered all the time which drains battery.
 
  • Like
Reactions: frep

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
today I managed to stick my iron on to experiment with 2 codes.

I calling them the dongle + internal v1 & v2 just for this experiment.

video 1)

this would require the reset button being used was hoping for it to be 5 wires needed only, but it would have to be 6 wires with reset going to power button.



video 2)
this should work as 4 or 5 wire install depending on how you wanted to deal with joycon wire.

jig or 10k resistor solder between pin 7 & 10 in the joycon or 10k resistor solder to pads 7 & 10 on the switches mobo.

or wire from pin 10 on the joycon rail mobo point going to gnd pad on trinket or mobo gnd point.

my favourite is the 10k resistor route.

unless someone has a better idea.

in this video pin 10 is going to the gnd on the trinket.

then I paused video and solder pin 10 to a 10k resistor on pin 7.



the bat wire would go to one of the cap points, so the trinket powers off & on when the switch is power on/off.

pad 3 is used in first video going to pin 10 on joycon rail.

the led will black out on ofw, but I still think I need to get that part a bit better if possible.

as I'm not able to actually test this internal yet I couldn't say how it's behaviour would be with the battery drain.

I'd imagine it be like any install.
 
  • Like
Reactions: Deleted User

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
here's the latest ReiNX h file for the ReiNX files in case you not got it yet.

Anyone that's grab the ReiNX ino files then just extract and replace the old one with this one..

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

if you don't like soldering to the this cap then remove it. and solder direct to the 3.2v pad once removed.

20180810_231410.png


then the cap you removed solder it between the bat & gnd pads.

20180810_231504.png


only use as a last resort. use at your own risk.

mind it's probably more difficult to remove the cap than it is to solder a wire to it..
 

Attachments

  • ReiNX h file.zip
    72.1 KB · Views: 136
D

Deleted User

Guest
You can't. The trinket doesn't init fast enough before Nintendo bootloader kicks in. Unless you have trinket powered all the time which drains battery.
Yeah that's what I found out right away too back when we were trying out different wiring options, it's either a simple install with AutoRCM or harder install without (but then there's the chance of a crash etc going to OFW).

I tried going off the joycon power rails early on too but it doesn't init fast enough either.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: 9:02 am here