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.

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,226
@frep, Yes I see what you mean about that diode - haha, that's why more people looking at circuits is better, as someone will spot any mistakes - thanks for pointing this out! Maybe this would be better:
2e545qp.jpg


Also, if connected via usb, I would directly feed the enable pin with this usb signal, so that the m0 is permanently enabled while usb is connected (and powering).

That's the whole point - it means if you had issues flashing a new payload, due to timing or something - you power from a laptop and just reset the chip to put a new payload on, no need to worry about the trinket shutting itself down or anything.
 
Last edited by mrdude,
  • 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
the 0603 SOD-523 diodes should do for a replacement, defo a good fit and have had one in a switch for 3 days no issues.

20180726_081419.jpg


just search aliexpress for 0603 SOD-523 1N4148 and you'll find thousands of them.

cost me £1.50 for 200.
 

frep

Well-Known Member
Newcomer
Joined
Jul 7, 2018
Messages
52
Trophies
0
Age
42
XP
474
Country
Switzerland
Small progress at the custom board:
Thanks to the seeger j-link programmer edu mini, I got some more information what was going wrong with the breadboard chip. It complained, that no proper connection via swd interface could be established. Since connecting the same way works for example for the trinket m0 chip, the error is at my circuit. I was thinking, that I maybe harmed the chip while soldering it onto the breakout-board, so I tried another chip on another breakout-board. The soldering was better, I was confident, but the error was still there. I then compared my circuit with the one of an arduino zero, and added some caps at the voltage pins

schematic.jpg

After that, connecting with the j-link was no more a problem. Reading the device signature, fuses and flash works now fine, what before didn't worked at all!

JLink.jpg


Next step is to successfully program the device
If that all works, I have to look, if the caps are also needed for the board. If so, I had to make changes to the design, and get a second version of the pcb done... I guess that's the price to pay, if pcbs are ordered, before everything is working on the breadboard :-D
 
  • Like
Reactions: mrdude

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,226
Next step is to successfully program the device
If that all works, I have to look, if the caps are also needed for the board. If so, I had to make changes to the design, and get a second version of the pcb done... I guess that's the price to pay, if pcbs are ordered, before everything is working on the breadboard :-D

Good stuff, If you look in the datasheet - you only need to use 2 capacitors, your original circuit looks correct - you maybe just need to use a higher value capacitor instead?

21oau54.jpg


Also, if you look at page 948 of the datasheet, it's wired how your new layout is wired - apart from it looks like they also added a choke?

anzuqv.jpg


If you want to save messing about with bootloaders, just use the trinket bootloader for now, once you get that working - use the zero bootloader, but mod it slightly.

Also since you're going to make a new pcb layout, would you be able to add that mod I posted a picture off yesterday? Let us know how you get on though :-)

Also this is the trinket schematic:
rjqfkp.png
 
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
Good stuff, If you look in the datasheet - you only need to use 2 capacitors, your original circuit looks correct - you maybe just need to use a higher value capacitor instead?

21oau54.jpg


Also, if you look at page 948 of the datasheet, it's wired how your new layout is wired - apart from it looks like they also added a choke?

anzuqv.jpg


If you want to save messing about with bootloaders, just use the trinket bootloader for now, once you get that working - use the zero bootloader, but mod it slightly.

Also since you're going to make a new pcb layout, would you be able to add that mod I posted a picture off yesterday? Let us know how you get on though :-)

Also this is the trinket schematic:
rjqfkp.png
@mrdude
Thanks for checking the datasheet! As you have mentioned, maybe the actual solution with only one cap works (if high enough). In this case, I won’t do a second revision of the board. If a second revision is needed, I can consider your modification. But maybe to save some space (and two diodes), I was thinking to just setting the enable pin high with the usb signal and not power the circuit over usb... just thinking, nothing decided yet.
For testing the bootloader I will stick to your plan and start with the one of the trinket. But probably tomorrow instead of today, I need an evening off ;-)
 
  • Like
Reactions: mrdude

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,226
@frep, Here's the flash dumps of the trinket:

Code:
https://mega.nz/#!lgBwFYQY!_joVWJw47bKxQCEKF76X0UPbdKYgA19konsuSndkWxI

Both dumps have the trinket bootloader, if flashing with your J-link you might need to set the fuse bit to 0x7 to unlock the bootloader.

Original dump contains the trinket python files + libs, so it's an exact trinket dump and will show up in your usb as that
TXOS dump, contains the payload for the tx os.

Anyway, have fun and good luck :-)
 

frep

Well-Known Member
Newcomer
Joined
Jul 7, 2018
Messages
52
Trophies
0
Age
42
XP
474
Country
Switzerland
@frep, Here's the flash dumps of the trinket:

Code:
https://mega.nz/#!lgBwFYQY!_joVWJw47bKxQCEKF76X0UPbdKYgA19konsuSndkWxI

Both dumps have the trinket bootloader, if flashing with your J-link you might need to set the fuse bit to 0x7 to unlock the bootloader.

Original dump contains the trinket python files + libs, so it's an exact trinket dump and will show up in your usb as that
TXOS dump, contains the payload for the tx os.

Anyway, have fun and good luck :-)

@mrdude
Thanks for the bootloader-files. I was able to flash it onto the breadboard chip and it finally showed up as a trinket m0.
Double tapping the reset button opens the "trinketboot", like it should! Nice!
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,226
@mrdude
Thanks for the bootloader-files. I was able to flash it onto the breadboard chip and it finally showed up as a trinket m0.
Double tapping the reset button opens the "trinketboot", like it should! Nice!

No problem, and you're quite welcome. I hope you manage to get your board sorted out at some point and please let us know how you get on. Thanks again :-)

If you want to add a crystal if you ever want to use an unmodded zero bootloader:

5e8jf6.jpg
 
Last edited by mrdude,
  • Like
Reactions: Deleted User

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,226
@frep, Here's the zero bootloader with all the stuff removed that requires the xtal - this should work fine:

Code:
https://mega.nz/#!YoIB0YpR!9O1wG1vRQTv8ZMR7VtsWdrZ964j9rLblqYHsSyVJC8o

Here's the source for it, you can see what files are modded (and apply the same patches to newer code versions):
Code:
https://github.com/kliment/ArduinoCore-samd

If you're happy using the trinket bootloader though, probably stick to that if you don't intend on changing any of the default defined pins.
 

Xandroz

Well-Known Member
Member
Joined
Mar 19, 2018
Messages
872
Trophies
0
Age
35
XP
1,625
Country
Egypt
sorry but im getting my trinket tommorow or after, has been in customs for the past week.

im now lost between this threadand the other one :D

i just want to install a trinket so i dont have to insert a jig each time and sx pro.
i own a licence for sx os, i boot both stock and cfw.
i dont mind the installation method, i am just looking for something that doesnt drain my battery, and just want to have both options avaliable to me.

i was going with the 6/7 wire method but heard there are problems with it which i didnt clearly understand.

so anyone can guide me to which one to go with ill be greatfull

i was going to do the method that allowed me to volume up and power = cfw and normal power = stock

but heard something not going right with the trinket and the rcm strap line something like that.
and it was taken down later
 
Last edited by Xandroz,

mrdude

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

Finally the dev boards I ordered turned up £1.71 for 10, which is quite a decent price. I've soldered a blank chip on (by hand), and put some pin headers on. I'll mess about with bootloaders tomorrow if I get some time.

11uf190.jpg


I'm still waiting on some capacitors to turn up and some sop23 to dip adapter boards so I can test out everything is working, once I get them I'll test all the code and stuff and try and design a board (unless your board works fine, & If you post the files I'll use your design).
 
  • Like
Reactions: frep and t-bot

frep

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

Finally the dev boards I ordered turned up £1.71 for 10, which is quite a decent price. I've soldered a blank chip on (by hand), and put some pin headers on. I'll mess about with bootloaders tomorrow if I get some time.

11uf190.jpg


I'm still waiting on some capacitors to turn up and some sop23 to dip adapter boards so I can test out everything is working, once I get them I'll test all the code and stuff and try and design a board (unless your board works fine, & If you post the files I'll use your design).

Nice to hear that your dev boards have arrived, and will soon have everything together! Also, I'm glad to hear that you will also messing around with the bootloader, since this is no task I'm looking forward to. (Just happy, the trinket bootloader finally works).
My custom board should be shipped today, and start its journey from china to switzerland. (Should arrive here the 5th of august, or so...) I'm very curious, if they will work as they are, or if a second round is necessary (because of the supply caps). If they work, I can send you some boards as promised.
If you decide to make your own custom board, just tell me if you need some files. I will publish them anyway, but first, I want to be sure, they work. If you don't want to put the extra caps in your design, I would wait, until I can confirm, if the board is working without them.

Until the boards arrive, I'm at rewriting the arduino-sketch for my board.
 
  • Like
Reactions: mrdude

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,226
Nice to hear that your dev boards have arrived, and will soon have everything together! Also, I'm glad to hear that you will also messing around with the bootloader, since this is no task I'm looking forward to. (Just happy, the trinket bootloader finally works).
My custom board should be shipped today, and start its journey from china to switzerland. (Should arrive here the 5th of august, or so...) I'm very curious, if they will work as they are, or if a second round is necessary (because of the supply caps). If they work, I can send you some boards as promised.
If you decide to make your own custom board, just tell me if you need some files. I will publish them anyway, but first, I want to be sure, they work. If you don't want to put the extra caps in your design, I would wait, until I can confirm, if the board is working without them.

Until the boards arrive, I'm at rewriting the arduino-sketch for my board.

Thanks for the offer or a board, Yes of course I would love to test one out. I am purposely not chipping my switch just now with the trinket as I believe your board design to be a far superior mod, the trinket mod is ok - but having the option to power off easily is the better design for my purposes. Also I don't have any experience of using cad programs to make boards or smd parts, so it will be easier for me without needing to learn to use software for making gerbers as well. I usually just use through hole parts and breadboards/stipboard etc.

TBH the trinket bootloader is fine as it is, and is suited for our purposes, I just want to change some code so pin13 is not defined and a couple of other things as well such as the names that show up when connected to USB. Nothing major so keep using the trinket bootloader just now. I was messing about with wiring the chip up last night, but when I connected pin 17 & 18 to v+ and gnd, the chip gets hot - I soldered another board and the same thing happened, checked with my multimeter and didn't have any shorts on any of the pins - so I'll need to wait for the caps to turn up (Wednesday), before I can mess about any further.

EDIT:


OK after doing a few experiments (3 chips), I found the following:

Pins 5,18,35,42 are all ground pins and are connected internally to each other - so only 1 ground wire from the chip is required.
Pins 17,36,44 are all 3.3v pins and are all connected together internaly
Pin 6 is also 3.3v but is not connected internally to the other 3.3v pins.

1: After soldering check all pins - do a continuity on all adjacent pins to make sure they are not shorted (you'll not have any continuity before any power is applied to the chip).

2: If you power up the chip without a bootloader and only connected via gnd + power, after a few seconds the chip will get hot and bridge all GND to 3.3v pins (sometimes pin6 will short to gnd, but pin 17,36,44 will all be bridged to ground).

I don't know if powering up before programming breaks the chip - but it seems to need the bootloader pogrammed or it will just get very hot due to shorting out :-), At first I thought this was a soldering issue - but after 3 chips and checking for shorts prior to power, it's not. So be warned if doing your own chips!
 
Last edited by mrdude,

frep

Well-Known Member
Newcomer
Joined
Jul 7, 2018
Messages
52
Trophies
0
Age
42
XP
474
Country
Switzerland
The custom pcb has now his own configuration for the Arduino IDE:
The board informations are added with the board manager of the Arduino IDE. After that, the board "switchM0D" can be selected.

The configuration of the board seems to correct. At least, I was able to program a working blink sketch with this custom chip configuration.

BoardManager.jpg


ArduinoSwitchM0D.jpg
 
  • Like
Reactions: t-bot and mrdude

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
sorry but im getting my trinket tommorow or after, has been in customs for the past week.

im now lost between this threadand the other one :D

i just want to install a trinket so i dont have to insert a jig each time and sx pro.
i own a licence for sx os, i boot both stock and cfw.
i dont mind the installation method, i am just looking for something that doesnt drain my battery, and just want to have both options avaliable to me.

i was going with the 6/7 wire method but heard there are problems with it which i didnt clearly understand.

so anyone can guide me to which one to go with ill be greatfull

i was going to do the method that allowed me to volume up and power = cfw and normal power = stock

but heard something not going right with the trinket and the rcm strap line something like that.
and it was taken down later

you could use this https://github.com/noemu/sam-fusee-launcher and possibly only have it 4 wire install only.

data wires To correct data points on the mobo/ the batt/usb or 3v pads to the cap on the mobo or the batt point on the mobo/ Gnd To Gnd Point On mobo.

add a 10k 0603 or 0805 smd resistor to pad 7 in the right joycon, solder a bit of kynar wire to pad 10 then solder the other end of the wire to the 10k resistor.

Joycon_mod.jpg


that should work in the same way it does for the dongle version.

you could remove the green power led if you wanted.
 
Last edited by M-O-B,
  • Like
Reactions: Xandroz

Xandroz

Well-Known Member
Member
Joined
Mar 19, 2018
Messages
872
Trophies
0
Age
35
XP
1,625
Country
Egypt
thanks alot fully notted, so with this i can use normal power button to boot to stock, and volume up to boot to sx menu loader and get from there.

and thanks for you explaination
 

M-O-B

Well-Known Member
OP
Member
Joined
Jun 23, 2018
Messages
281
Trophies
0
Age
54
XP
583
Country
United Kingdom
thanks alot fully notted, so with this i can use normal power button to boot to stock, and volume up to boot to sx menu loader and get from there.

and thanks for you explaination

only thing I've just realised is when ofw is booted the led keeps flashing, but other than that it would work fine.

power + volume up button for cfw.
power button for ofw.

maybe something adding to the code to send the led to sleep if ofw is booted.

as it shows once payload is loaded led off.
ofw it's flashing like a good un.



added sx os ino and uf2 drag and drop if you want to try.
 

Attachments

  • Arduino_Sxos_ino + Uf2_D&D.zip
    62 KB · Views: 252
  • Like
Reactions: Xandroz

Xandroz

Well-Known Member
Member
Joined
Mar 19, 2018
Messages
872
Trophies
0
Age
35
XP
1,625
Country
Egypt
thats fine by me i only boot ofw to update games every couple of weeks.

thanks alot will use yr method and report back in 2 days.

so ill use this file for thr internal install correct

and the trinket powers off completley correct on shutdown or have to go to xecuter's menu and power off from there
cheers mate
 
Last edited by Xandroz,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: Wish I could use that for video editing lol