Time for another update. Bad news. Skip to the second last paragraph if you want a TL;DR.
So, I thought I'd do some further testing on game card slot power behavior, so I soldered some more tiny wires to an unpopulated V2 PCB and wrote down the results. It's looking like I won't be able to grab power from the game card slot like I wanted to.
Previously, as I didn't have any kind of game card breakout adapter (since one didn't exist), I soldered tiny wires to an actual game cartridge and did my tests that way. You can find that post here:
https://gbatemp.net/threads/dragoni...r-trinket-m0-clone.511780/page-2#post-8171816 but the long and short of it is, I was able to measure a constant 3.06v from the game card slot anytime the Switch wasn't sleeping. Generally, something like a game card slot will either have constant power or have some physical mechanism to enable power when a cartridge is inserted, and there was no real reason to assume the Switch would be any different. Unfortunately, it seems Ninty is doing things a little differently now.
Much like the USB Type C connector I was dealing with earlier, The Switch does not keep it's VCC terminal hot for the game card slot. As it turns out, there exists a 17th pin in the game card slot that I couldn't find documented anywhere. I've attached the best picture I could get to this post. This pin shares the same pad as the ground pin, but sits at negative 1.8v. When a game card is inserted into the Switch, "Pin 17" is shorted to ground and is effectively "pulled up", which lets the Switch know there's a game card inserted so it can start sending power. At this point, VCC becomes hot and 3.3v is sent to the cartridge.
Now, this is where the trouble begins. Once the game card starts receiving power, the Switch expects it to start communicating. It sends a few commands and then listens for a response. In my tests, the Switch will send power for anywhere between 2 to 10 seconds, and once it decides a response isn't coming, it shuts down power to the game card slot and displays an "error reading cartridge" message on the screen. The Switch won't send power to the card slot again until "Pin 17" becomes floating once more, followed by getting "pulled up" to 0v (ground) again. In a perfect world, I'd do my best to emulate a cartridge using the ATSAMD21, but almost nothing about the proprietary data format is known, and that's not even considering that at some point shortly after the initial handshake, the data becomes encrypted with an unknown algorithm. It's also likely this approach would involve code copyrighted by Ninty, which is just asking for trouble.
As it stands, charging via the game card slot is not really viable. It is very possible a software solution to this could be made, since it's software that's controlling the power to the game card slot. To test this, I booted into the SX OS boot menu, and no matter what I did I could not get 3.3v from the card slot. Something in Horizon is reading "Pin 17" and deciding to send power when it shorts to ground. Unfortunately, I don't have the coding skills to even try to figure out how to implement a possible software fix.
In summary, card slot charging is probably a bust without a software fix I don't know how to make. I'm still going to continue with the project, as you can still charge the dongle via the Switch's USB port when not in RCM or via a computer, and it's still really convenient to have the dongle on you all the time along with the RCM jig and not have to worry about losing it. It just won't pop out of your card slot fully charged. The V3 set of PCBs arriving tomorrow will work with no issues aside from the card slot pins serving only to make it look more like a real game cart. No other feature is affected by this - only the ability to charge the dongle via the game card slot, so I think it's still a worthwhile project. (Technically you still could charge it in the game card slot port, but you'd have to insert and remove it a couple of times and clear that annoying error, which is rather inconvenient - at that point you might as well just plug it in to the Type C port.)
I'd really like to hear what you all think, or if anyone might have a lead on a software solution. Normally, something like this would've been a brief bump in the road for me and then I'd keep moving on without thinking much on it, but this project has garnered a lot of attention now and it's hard to say exactly what people were most excited about. Is this a dealbreaker for most, or just a minor annoyance? A lot of people had requested the ability to disable charging from the card slot, so perhaps it was just a "nice to have" feature, or perhaps not.
Let me know!
Thanks everyone!
EDIT: The silver lining is that without the paltry 27.5mA limit I had for max power consumption from the card slot, I can up the charging current to around 500mA for
much faster charging. 5 seconds for a full charge when brand new (0v), 4 seconds for a full charge from shotdown (1.7v) and half a second for 3 or 4 injections.