RELEASE Gemma M0 / Trinket M0 UF2 Files & Guide - Battery Discharge Fix

Discussion in 'Switch - Backup Loaders & Modchips' started by mattytrog, Jun 20, 2018.

  1. mattytrog

    mattytrog Empty Brain

    Apr 27, 2018
    United Kingdom
    A brief overview of the mod...

    This is a trinket internal modification which basically replicated SX Pro dongle functionality from inside the console.

    This is accomplished by running an umbilical from pin 5 (VCCIN) on the M92T36 USB 3 controller, which is the internal supply to the USB controller. This is at 3.3v and powered on from boot time and this is the most suitable place to connect the trinket. The trinket draws approx 1.4mA when pushing the payload and approx 1.1-1.2mA during sleep. The trinket disconnects when internal power to the controller cuts out. Connecting to VB (pin 9) isn`t suitable.
    Mounting the trinket device itself in the air duct is fine. Airflow is not noticeably reduced due to space between the shielding and back casing, further improved by the trinket not being flat (reset button and capacitors). The LDO regulator on the trinket is not used and can be discarded if required.

    Download links at bottom of OP. Read the pros and cons first near the bottom!!!

    16/07/2018 UPDATE 1: Hekate 3.2 & SXOS test UF2 added. Try and report back please. This is for AutoRCM users ONLY using METHOD 1!!! Power off and reboot IN HORIZON should be working correctly now. The Hekate menu Reboot (normal) remains broken. For now. Download below... "" or ""

    12/07/2018 UPDATE 1: Files for Gemma M0 added. Same installation as trinket. Different pin numbers!!! You will need to remove battery header, on/off switch and prefeably USB port without knackering up the traces from SAMD... FOLLOW METHOD 1!!! and include the extra RCM / vol straps from method 2 if you want them. Dotstar LED is now white, maximum brightness when operational. This is so you have a chance of seeing it working when switch back cover on.
    Pin 0 - Goes to volume switch - Picture 1
    Pin 1 - RCM strap - Picture 2
    Pin 2 - Volume + strap - Picture 2... Double check it is the right one!!!
    USB lines are the same as trinket - Picture 1
    GND - Ground on board
    3v on Gemma - Capacitor as pictured in picture 1.

    10/07/2018: As a workaround for the Hekate reboot RCM problem, when in Horizon, hold down power button and rather than selecting power off or restart, just hold power button for 8 seconds. Switch turns completely off and will always reboot :) Hekate 3.2 added for both methods. Download attached to bottom of this post. There seems to be a difference in the power-off routines for SXOS and Hekate. If you are using Hekate with method 1 & 2, selecting power off in Hekate (and Horizon that has been booted with Hekate) will put you into RCM and won`t reboot. Holding down power for 12 seconds fixes this and boots normally. The same happens if you select restart. My testing leads me to believe that at every boot / reboot in SX OS, it turns the trinket completely off and back on, allowing a normal boot. This appears to be part of the battery recalibration routine in SXOS. I`ve been testing this all evening. So it appears that SX loader is superior as a bootloader in the case of internal installs and cold boots. Hekate is superior regarding NAND backups, patches etc etc... Just be mindful that if you are using Hekate, selecting restart will put you in RCM.

    • Q - Whats the point of this thread? There are others here for trinket installs.
    • A - To stop the trinket flattening the battery when switch is in storage. There are other threads here for installs. But they seem to all keep the trinket connected permanently to the battery. This is a different approach. Slightly.

    • Only the 3v Trinket M0 will work with this method. It must have a ATSAMD21 microcontroller for USB host mode purposes.
    • Select your chosen method and download appropriate file from attached files. You are better off making a choice regarding UF2 files and sticking to it. Once installed, it is a pig to get the trinket in download mode using method 1 & 2.
    • Double-press RESET on trinket while plugged in to PC.
    • You will see a small drive open. Delete / backup whatever is on there and extract the files from your download and drag and drop to the drive.
    • There are 3 files in total...
    • You need the CURRENT.UF2, INDEX.HTM and INFO_UF2.TXT from the downloaded file in the TRINKETBOOT drive.
    • Trinket will boot automatically
    • Disconnect and proceed to an install method below
    • For every internal install ever, done by whoever, the switch will not boot using the trinket when in docked mode. It will boot without it if AutoRCM is disabled. This can be an advantage to not using AutoRCM as it boots(really???)... Big BUT though... If it isn`t using the trinket, you aren`t getting CFW / hax/ homebrew.
    *****METHOD 1*****

    trinket_switch_install.png View attachment 134955 UPDATE 8/7/2018

    This is, in my opinion, the easiest way to permanently mod your switch without the Trinket flattening battery.

    Get a trinket, flash it with below files of your choice.

    Solder as laid out in the picture. Mount somewhere. Somewhere you can flex the panel and press reset if you need to, for checking console is off for example. I use easy-strip (with soldering iron) 40 AWG magnet wire. Secure each wire with a dab of epoxy or even superglue if you can get the tiny amount on there. If you want to that is.

    You need to enable AutoRCM!!! I think we should rename AutoRCM to "AutoFuseSave" to get the message out there...

    The switch will power on with a single power button press.

    For method 1 & 2 - Selecting restart in the power menu will put you in RCM mode if you are running Hekate. Hold down power for 12 seconds and restart. Restart in SXOS works correctly - SHOULD BE FIXED... Try test UF2 files at the bottom of OP please!!!

    You do not have to flex the back panel if you don`t need to. The console will cold-boot.

    4-wire install. I recommend mounting in air duct with double sided tape (no it won`t make your processor overheat. Air flow isn`t restricted. Blow up it and see for yourself with trinket fitted. Mount it vertical. Remove USB port and solder to pads if you haven`t got a shim or something you can butcher.


    *****METHOD 2*****

    If you REALLY don`t want to use AutoRCM then continue...

    I recommend you use AutoRCM though to avoid burned efuses if you want to chop and change firmwares

    See first picture for reference

    3v - capacitor next to M92T36. Going to pin 5 on QFP - first pictore
    GND - Ground point on motherboard - picture 1
    Pin 3 - RCM strap (pin 10 of joycon or point on board) - picture 2
    Pin 4 - Ground this to reset the trinket - Designed to go to power switch return on board (so when power switch is pressed and goes to ground, this does too...) - picture 3
    Optional: - Pin 0 - Volume+ strap (goes to return from volume+ switch to emulate pressing vol+ to get into RCM). If you do not connect this, you will need to manually press vol+ and power on to boot to Hekate/SX. Useful to boot into OFW by default?

    MvJEDTUnxMS4Olqs.huge - Copy.jpg


    I do wonder if the trinket can boot fast enough from being completely off, to putting console in RCM in that split second. Of course, if the trinket is already powered (as in the case of attaching the BAT to a permanent voltage line, the power button will reset the trinket holding down the lines and booting into RCM. Any feedback?

    *****METHOD 3*****

    The older method which involves all of the above apart from pin 4 going to the same capacitor and the trinket being permenently connected to power.
    This is a current-sensing method that will use a positive voltage on pin 4 to reset the trinket.


    Method 1 vs Method 2 vs Method 3 pros and cons as I see it...

    Method 1 Pros:
    Doesn`t burn efuses - guaranteed as the console will not boot without payload
    Doesn`t keep trinket powered all of the time, even when off like other methods do
    Easy(ish) and faster install - 4 wires

    Method 1 Cons:

    If you don`t confirm your console is off, you might have inadvertantly put it into RCM by rebooting instead of shutting down. This will flatten your battery. This happens using Hekate only so it appears. If this happens to you, let switch charge for a good while before trying to boot. Or you might have to remove cover and disconnect/reconnect battery. And smile to yourself because your efuses are still intact.
    Trinket can be a pig to get back in bootloader mode once installed. It is all about timing.

    Method 2 Pros:

    If you leave out the vol+ strap, you can either boot normally (by pressing power) or SXOS/ Hekate (holding vol+ while pressing power)

    Method 2 cons:

    Does the trinket boot fast enough from being powered completely off? If not, a method exists (not putting it out there just yet as it involves cuttong a trace / removing a component). FEEDBACK NEEDED ON THIS METHOD AS IT IS AT THE MOMENT PLEASE!!! Logic dictates to me that the trinket cannot load fast enough.

    Method 2 & 3 Pros:

    Avoids AutoRCM so you can never forget it is in RCM

    Method 2 & 3 Cons:

    Potential to burn efuses if trinket decides not to boot, rendering your hard-work efuse-safe upgrade useless (finding keys, finding cartridges/firmware, etc etc)
    Kids will come to you asking why you can`t pick a game out of the album as it has booted into OFW. Ruining your peace and quiet.
    More wires... More soldering, more traces to burn, more headaches
    More time... The wife/husband/pet will be more pissed off because you are taking a long time to do it...

    Method 3 Pros:

    Achieving Trinket bootloader mode can be somewhat easier after installation

    Method 3 Cons:

    Trinket will keep trickle-draining your battery as the PMIC at present is not configured to turn off that part of the board upon power-off

    Credits to Quantum-Cross, Atlas44, @Ninoh-FOX , @jcrorxp , @tecfreak and everyone else for valuable input.


    You only have yourself to blame... What worked for me may work differently for you. I`m not responsible if you knacker your switch. This modification voids your warranty!

    Attached Files:

    Last edited by mattytrog, Jul 16, 2018 at 8:10 AM
  2. epickid37

    epickid37 ( ͡° ͜ʖ ͡°)

    Jan 4, 2017
    United States
    mushroom kingdom
  3. shabbypenguin

    shabbypenguin Advanced Member

    Apr 29, 2015
    United States
    Can you share the sketch so folks can swap out the payload as needed?
  4. jjbredesen

    jjbredesen Developer

    GBAtemp Patron
    jjbredesen is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Feb 16, 2018
    Nice, now we can have a $9 SX Pro once the SX OS cracking is complete.
  5. mattytrog

    mattytrog Empty Brain

    Apr 27, 2018
    United Kingdom
    It is already in the binary. You load it into Arduino and it will give you a "main" and a "payload.h"
    gamer4lif3 likes this.
  6. pro-pumper

    pro-pumper Member

    Apr 3, 2018
    very nice..
  7. salamandrusker

    salamandrusker Advanced Member

    Mar 12, 2018
    nice job
  8. jahym

    jahym Newbie

    Jun 16, 2018
    United States
    what does it do exactly ???
  9. Trappie

    Trappie GBAtemp Regular

    May 20, 2018
    Deliver the payload and launch sx os
  10. wicksand420

    wicksand420 GBAtemp Addict

    Nov 13, 2016
    United States
    just deliver a payload, unless you own sx os
    Last edited by wicksand420, Jun 20, 2018
  11. olku

    olku Member

    Oct 31, 2015
    Thank you for this.

    Is it possible to install Trinket m0 inside Switch and run it from Switch battery? I think it should fit, but I don't know if Switch has test points to solder to.
  12. mattytrog

    mattytrog Empty Brain

    Apr 27, 2018
    United Kingdom
    Yes. Very possible.

    The drill goes like this...

    Connect to 4v feed from battery, connect to testpoints behind USB port.

    HOWEVER......... The trinket stays powered. So you need a little addition to the trinket (a couple of components) which only let the trinket run for 3 or 4 seconds as power button pressed. Or it will run your battery down eventually. So you need to fit it to another point on board with the other bits that only let it run for 3 or 4 seconds.

    I said I`d do a write-up how I`d done mine. And I will. Its just one of them "get round to it" jobs. The pain in the arse comes when you want to update the payload on the trinket. You either need to drill a hole in the back of the switch casing and shield, or it is possible to attach it to the metal shielding on the back and you can just press the back cover to activate the switch as its a tight fit.

    It isn`t for the feint of heart but it works. The possibility of killing your switch through bad soldering is huge.
    olku and hippy dave like this.
  13. Rusb

    Rusb GBAtemp Regular

    Apr 17, 2014
    Thank you, tomorrow I'll have the trinket to test it!
  14. LucaFraga

    LucaFraga Advanced Member

    Aug 10, 2009
    So, is there any Trinket M0 cheap chinese knockoff we can buy to save on money? Here in Italy it's EUR 15 plus shipping
  15. devleon

    devleon Member

    Aug 17, 2016
    Gambia, The
    Is the trinket going to be powered by the switch alone? I thought the switch doesn't deliver power in RCM mode which is why the SX Pro has these capacitors in them... Or am I wrong here?
  16. mattytrog

    mattytrog Empty Brain

    Apr 27, 2018
    United Kingdom
    The trinket is battery powered. It has a regulator on it. Good for up to about 9v I think. Cut a USB cable up, solder it to the gnd and batt pads on trinket and use a powerbank? Or fit internally. Coin cell? Anything really from 3v up to 8v ish?
  17. bluke

    bluke GBAtemp Regular

    Feb 2, 2010
    Do I need to copy payload.bin into it ?
  18. Joxley192

    Joxley192 Member

    Feb 22, 2018
    United Kingdom
    thank u for this cause i have been trying to make one of these and program it but it just kept on saying error cant find trinket m0 and this as save me alot of a lot of time now just looking to find a way to get it to work in side the switch o it doesnt drain my battery :)
  19. mattytrog

    mattytrog Empty Brain

    Apr 27, 2018
    United Kingdom
    No it is ready to go. Just drag and drop to TRINKETBOOT drive
  20. nachuz

    nachuz GBAtemp Regular

    May 21, 2017
    and then a SX OS update releases and it fucks the crack
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice