1. M-O-B

    OP M-O-B GBAtemp Regular
    Member

    Joined:
    Jun 23, 2018
    Messages:
    281
    Country:
    United Kingdom
    just replace the cap then your good to go. if I remember correctly it won't work via the dock without that cap.

    — Posts automatically merged - Please don't double post! —

    this will do you. Trinket_Dongle_v3.jpg
     
    invaderyoyo and frep like this.
  2. bartys

    bartys Advanced Member
    Newcomer

    Joined:
    May 16, 2018
    Messages:
    51
    Country:
    Poland
    Thanks. Will this dongle fit in the cartridge slot?
     
  3. mrdude

    mrdude GBAtemp Advanced Fan
    Member

    Joined:
    Dec 11, 2015
    Messages:
    709
    Country:
    @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

    [​IMG]

    [​IMG]

    I'll be able to start messing with the bootloaders now :-)
     
    Last edited: Aug 4, 2018
    ModderFokker619 and frep like this.
  4. electronrancher

    electronrancher GBAtemp Regular
    Member

    Joined:
    Aug 4, 2018
    Messages:
    208
    Country:
    United States
    I'm working on a dongle with onboard battery for external, and bigger USB pads for internal install. Those things are murder to solder to!
     
  5. frep

    frep Advanced Member
    Newcomer

    Joined:
    Jul 7, 2018
    Messages:
    52
    Country:
    Switzerland
    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)
     
  6. mrdude

    mrdude GBAtemp Advanced Fan
    Member

    Joined:
    Dec 11, 2015
    Messages:
    709
    Country:
    @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: Aug 4, 2018
  7. olku

    olku Advanced Member
    Newcomer

    Joined:
    Oct 31, 2015
    Messages:
    72
    Country:
    Estonia
    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.
     
  8. frep

    frep Advanced Member
    Newcomer

    Joined:
    Jul 7, 2018
    Messages:
    52
    Country:
    Switzerland
    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?
     
    mrdude likes this.
  9. mrdude

    mrdude GBAtemp Advanced Fan
    Member

    Joined:
    Dec 11, 2015
    Messages:
    709
    Country:
    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: Aug 4, 2018
    frep likes this.
  10. frep

    frep Advanced Member
    Newcomer

    Joined:
    Jul 7, 2018
    Messages:
    52
    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
     
    mrdude likes this.
  11. mrdude

    mrdude GBAtemp Advanced Fan
    Member

    Joined:
    Dec 11, 2015
    Messages:
    709
    Country:
    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: Aug 4, 2018
  12. frep

    frep Advanced Member
    Newcomer

    Joined:
    Jul 7, 2018
    Messages:
    52
    Country:
    Switzerland
    @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.
     
  13. mrdude

    mrdude GBAtemp Advanced Fan
    Member

    Joined:
    Dec 11, 2015
    Messages:
    709
    Country:
    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.
     
  14. M-O-B

    OP M-O-B GBAtemp Regular
    Member

    Joined:
    Jun 23, 2018
    Messages:
    281
    Country:
    United Kingdom
    Updated Payload INO Files & Now Included UF2 Files For Drag and Drop, Included The Bin Converter File, Python 2.7 Is Needed To Run It.

    ReiNX
    RajNX
    SXOS
    Hekate 3.2
     
  15. mattytrog

    mattytrog You don`t want to listen to anything I say.
    Member

    Joined:
    Apr 27, 2018
    Messages:
    3,658
    Country:
    United Kingdom
    We should team up on our install threads :)
     
    M-O-B, frep, tecfreak and 1 other person like this.
  16. M-O-B

    OP M-O-B GBAtemp Regular
    Member

    Joined:
    Jun 23, 2018
    Messages:
    281
    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
     
  17. mattytrog

    mattytrog You don`t want to listen to anything I say.
    Member

    Joined:
    Apr 27, 2018
    Messages:
    3,658
    Country:
    United Kingdom
    It wasn't. It was in back up loaders and modchips
    :)
     
  18. M-O-B

    OP M-O-B GBAtemp Regular
    Member

    Joined:
    Jun 23, 2018
    Messages:
    281
    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: Aug 8, 2018
  19. mattytrog

    mattytrog You don`t want to listen to anything I say.
    Member

    Joined:
    Apr 27, 2018
    Messages:
    3,658
    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.
     
    M-O-B likes this.
  20. M-O-B

    OP M-O-B GBAtemp Regular
    Member

    Joined:
    Jun 23, 2018
    Messages:
    281
    Country:
    United Kingdom
    I'll take a proper look later at the code later.
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Internal, Trinket, Install