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,029
  • Trinket-R4-Gemma-D&D-Files.zip
    421.3 KB · Views: 578
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
Wonder if I should cancel my switchMe REBUG or get me a trinket M0

Aside from a few bugs, trinket M0 is working pretty great from what I read

My only concerning is draining battery while off

nothing wrong with the trinket, as for battery drain ain't much difference with it installed or not.

not had any issues installing the trinket so I'd like to know what these bugs are coz I've never had one.
 

Pacote

Well-Known Member
Member
Joined
Jan 30, 2007
Messages
243
Trophies
1
Website
Visit site
XP
632
Country
Brazil
nothing wrong with the trinket, as for battery drain ain't much difference with it installed or not.

not had any issues installing the trinket so I'd like to know what these bugs are coz I've never had one.

Theres 0% battery drain If I power off my switch completely with the trinket installed?

It says on the git

https://github.com/Quantum-cross/sam-fusee-launcher-internal

Additionally, this is all experimental, there are some issues (see below).
 

mrdude

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

I've modded the openocd.cfg file for you, and uploaded it here, along with the bootloader for the zero:
Code:
https://mega.nz/#!NhpzwCTJ!ce3FNWYHFHuardiluyFWv7TRcfMjpBBtIj0cGzzdLoc

Copy to openocd.cfg and samd21_sam_ba.bin to your pi "/home/pi" folder
***Both files need to be in the same folder***. You can use a windows program called winscp to do this easily: login details will look similar to this:

2re2xys.jpg



If you use flashfxp or another ftp type program - it will look similar to this: (notice i'm using SFTP protocol over SSH)
1447maf.jpg


Open putty/telnet client and log into the pi

Type this commands:
Code:
ls
You should see openocd.cfg & sam21.sam_ba.bin in the directory, if not type this:
Code:
cd ~
cd /home/pi
ls

If you don't see the files now, you never put them in the correct folder.

Next type:
Code:
sudo openocd

You should get some info in your telnet/putty screen showing you this:
Code:
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
none separate
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 400 kHz
Info : SWD DPIDR 0x00736cb8

Press ctrl+c to exit from the program

Now go and edit openocd.cfg (use notepad++ as the pi needs to read unix(LF) UTF-8 formatted text files), don't use windows notepad.

Change this:
Code:
#at91samd bootloader 0
#program samd21_sam_ba.bin verify
#at91samd bootloader 8192
#reset
#shutdown

to:

Code:
at91samd bootloader 0 #this line unlocks bootloader protection
program samd21_sam_ba.bin verify #this line programs the bin file to the chip and then verifies it was written
at91samd bootloader 8192 #this line locks the bootloader protection
reset #this line sends a reset signal to the chip
shutdown

Now you should be able to program the chip, Enter the command:
Code:
sudo openocd

If everything went correctly - that should be the bootloader programmed.
 
Last edited by mrdude,
  • Like
Reactions: frep and t-bot

Maximize0987

Well-Known Member
Newcomer
Joined
Jun 24, 2018
Messages
46
Trophies
0
Age
44
XP
318
Country
United States
Wonder if I should cancel my switchMe REBUG or get me a trinket M0

Aside from a few bugs, trinket M0 is working pretty great from what I read

My only concerning is draining battery while off


haven't seen a bug yet, I just gave my sister her switch that I did several weeks back, it was fully charged and off after 2 weeks battery reported 93% and I had the original version that is said to drain 1.24ma while trinket is in deep sleep, hers is also using autorcm since I used the fuse saving update process.
 

frep

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

I've modded the openocd.cfg file for you, and uploaded it here, along with the bootloader for the zero:
Code:
https://mega.nz/#!NhpzwCTJ!ce3FNWYHFHuardiluyFWv7TRcfMjpBBtIj0cGzzdLoc

Copy to openocd.cfg and samd21_sam_ba.bin to your pi "/home/pi" folder
***Both files need to be in the same folder***. You can use a windows program called winscp to do this easily: login details will look similar to this:

2re2xys.jpg



If you use flashfxp or another ftp type program - it will look similar to this: (notice i'm using SFTP protocol over SSH)
1447maf.jpg


Open putty/telnet client and log into the pi

Type this commands:
Code:
ls
You should see openocd.cfg & sam21.sam_ba.bin in the directory, if not type this:
Code:
cd ~
cd /home/pi
ls

If you don't see the files now, you never put them in the correct folder.

Next type:
Code:
sudo openocd

You should get some info in your telnet/putty screen showing you this:
Code:
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
none separate
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 400 kHz
Info : SWD DPIDR 0x00736cb8

Press ctrl+c to exit from the program

Now go and edit openocd.cfg (use notepad++ as the pi needs to read unix(LF) UTF-8 formatted text files), don't use windows notepad.

Change this:
Code:
#at91samd bootloader 0
#program samd21_sam_ba.bin verify
#at91samd bootloader 8192
#reset
#shutdown

to:

Code:
at91samd bootloader 0 #this line unlocks bootloader protection
program samd21_sam_ba.bin verify #this line programs the bin file to the chip and then verifies it was written
at91samd bootloader 8192 #this line locks the bootloader protection
reset #this line sends a reset signal to the chip
shutdown

Now you should be able to program the chip, Enter the command:
Code:
sudo openocd

If everything went correctly - that should be the bootloader programmed.

Hey MrDude
Thanks a lot for the detailed instructions.
I hadn't much hope, since I found the typo with the missing .bin extension myself, but since you made all these instructions and provided the finished .cfg-file, I gave another try...
And it looks better! It seems, that the bootloader could be programmed with the rpi:

Code:
pi@raspberrypi:~/bootloader $ sudo openocd
Open On-Chip Debugger 0.10.0+dev-00459-g98a07154 (2018-07-18-20:45)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
none separate
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 400 kHz
Info : SWD DPIDR 0x0bc11477
Info : at91samd21g18.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : Listening on port 3333 for gdb connections
    TargetName         Type       Endian TapName            State
--  ------------------ ---------- ------ ------------------ ------------
 0* at91samd21g18.cpu  cortex_m   little at91samd21g18.cpu  reset
target halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x00000288 msp: 0x20002dd8
target halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x00000288 msp: 0x20002dd8
** Programming Started **
auto erase enabled
Info : SAMD MCU: SAMD21G18A (256KB Flash, 32KB RAM)
wrote 6656 bytes from file samd21_sam_ba.bin in 0.232107s (28.004 KiB/s)
** Programming Finished **
** Verify Started **
verified 6504 bytes in 0.534479s (11.884 KiB/s)
** Verified OK **
shutdown command invoked
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Success, thanks! :-D

Unfortunatly, connecting the to pc still doesn't show up an usb-port, also double-tapping reset doesn't do anything. At least, I'm quite confident now, that the programming of the bootloader works. There's still a possibility, that I damaged the chip as I soldered the chip onto the breakout-board (it wasn't really a good soldering job, I need some more practice) But since I only odered one breakout-board for a tqfp-48-package, I don't have another try at the moment. But wendnesday should arrive one of these https://www.adafruit.com/product/3571 and https://www.adafruit.com/product/1377 . I also hope, that I get the pcb design finished this weekend (but I can't promise). So there is some progress! :-)
 

mrdude

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

Well done on the flashing the bootloader though, perseverance pays off!

Also when connecting to the pc usb port - you'll need to connect d+ d- and gnd to the pc, don't connect the 5v though as you'll blow the chip - just use the 3.3v supply from the pi and ground to that as well.

Also, now you know the pi works - you could dump the entire contents of the trinket now (not just the bootloader), and flash that to your chip.

Also if you want to try different bootloaders - you can always find the latest here:
Code:
http://downloads.arduino.cc/Hourly/samd/package_samd-hourly-build_index.json

Example:
Code:
http://downloads.arduino.cc/Hourly/samd/package_samd-hourly-b188.tar.bz2

If you were to download the above file and then use 7zip to extract it - check the bootloader folder - you'll find various bootloaders for different versions of sam21 chips from adafruit. Also you can get handy info if you read some of the files - example:

Code:
#ifndef _BOARD_DEFINITIONS_H_
#define _BOARD_DEFINITIONS_H_

/*
 * USB device definitions
 */
#define STRING_PRODUCT "Arduino Zero"
#define USB_VID_HIGH   0x23
#define USB_VID_LOW    0x41
#define USB_PID_HIGH   0x00
#define USB_PID_LOW    0x4D

/*
 * If BOOT_DOUBLE_TAP_ADDRESS is defined the bootloader is started by
 * quickly tapping two times on the reset button.
 * BOOT_DOUBLE_TAP_ADDRESS must point to a free SRAM cell that must not
 * be touched from the loaded application.
 */
#define BOOT_DOUBLE_TAP_ADDRESS           (0x20007FFCul)
#define BOOT_DOUBLE_TAP_DATA              (*((volatile uint32_t *) BOOT_DOUBLE_TAP_ADDRESS))

/*
 * If BOOT_LOAD_PIN is defined the bootloader is started if the selected
 * pin is tied LOW.
 */
//#define BOOT_LOAD_PIN                     PIN_PA21 // Pin 7
//#define BOOT_LOAD_PIN                     PIN_PA15 // Pin 5

#define BOOT_USART_MODULE                 SERCOM0
#define BOOT_USART_BUS_CLOCK_INDEX        PM_APBCMASK_SERCOM0
#define BOOT_USART_PER_CLOCK_INDEX        GCLK_CLKCTRL_ID_SERCOM0_CORE_Val
#define BOOT_USART_PAD_SETTINGS           UART_RX_PAD3_TX_PAD2
#define BOOT_USART_PAD3                   PINMUX_PA11C_SERCOM0_PAD3
#define BOOT_USART_PAD2                   PINMUX_PA10C_SERCOM0_PAD2
#define BOOT_USART_PAD1                   PINMUX_UNUSED
#define BOOT_USART_PAD0                   PINMUX_UNUSED


/* Master clock frequency */
#define CPU_FREQUENCY                     (48000000ul)
#define VARIANT_MCK                       CPU_FREQUENCY

/* Frequency of the board main oscillator */
#define VARIANT_MAINOSC                   (32768ul)

/* Calibration values for DFLL48 pll */
#define NVM_SW_CALIB_DFLL48M_COARSE_VAL   (58)
#define NVM_SW_CALIB_DFLL48M_FINE_VAL     (64)

/*
 * LEDs definitions
 */
#define BOARD_LED_PORT                    (0)
#define BOARD_LED_PIN                     (17)

#define BOARD_LEDRX_PORT                  (1)
#define BOARD_LEDRX_PIN                   (3)

#define BOARD_LEDTX_PORT                  (0)
#define BOARD_LEDTX_PIN                   (27)

#endif // _BOARD_DEFINITIONS_H_

You can see what pins are set to turn on leds, etc. Also you can modify and compile the bootloader yourself if you want to assign different pins.
Guide here on compiling:
Code:
https://cdn-learn.adafruit.com/downloads/pdf/compiling-m0-atsamd21-bootloader.pdf

Looking at the above code, and a picture of the arduino zero - it's fitted with a crystal, so the clock speed is set different 48MHz, most likely why the USB is not working - I can't remember what the internal speed of the sam21 is - I think it's 8MHz without a crystal - so the data will be "garbled" - causing it to not show up. You could try using the trinket bootloader instead as that uses an internal clock - if that works, mod the zero code to use the same clock speed as the trinket.

If you want to keep your current bootloader and you have a spare 32.768kHz clock crystal - you could fit that and try USB again - this will prove that's why you're not seeing the chip on your pc.
 
Last edited by mrdude,
D

Deleted User

Guest
The battery drain is so trivial that it would take a full battery 4-5 months to drain via the trinket in powered off mode. The switch itself would likely chew far more since mine dies in sleep mode in less than a week unmodded. During normal use the amount is basically a rounding error.
 

mrdude

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

I've compiled the zero bootloader - but I changed the speed to 8mhz instead of 48mhz, this is untested by me but you can try this and see if it makes the usb work without using a crystal:

Code:
https://mega.nz/#!ZhJ0mS4Q!6x2goA5_MXLXnKeXkAb7vdtL_NZCWylV9aMLpej7HXM

The file above has this changed:
Code:
/* Master clock frequency */
#define CPU_FREQUENCY                     (8000000ul)
#define VARIANT_MCK                       CPU_FREQUENCY

/* Frequency of the board main oscillator */
#define VARIANT_MAINOSC                   (32768ul) #I probably should have changed this instead

I changed the CPU frequency, but I should have probably changed the main osc to 8000 instead, if you want to compile the bootloader yourself - change the file ArduinoCore-samd\bootloaders\zero\board_definitions_arduino_zero.h before you issue the make command.

I uploaded a bootloader with the cpu set to the default 48mHz, but the main oscillator changed to 8000 - it's probably worth trying that one first.

The file posted below has this changed:
Code:
/* Master clock frequency */
#define CPU_FREQUENCY                     (48000000ul)
#define VARIANT_MCK                       CPU_FREQUENCY

/* Frequency of the board main oscillator */
#define VARIANT_MAINOSC                   (8000ul)
Code:
https://mega.nz/#!doBUXK6Z!e3TqUgrb00b4sIQuM7dYetjlK6MXGseRydeRENwIqag

Also, read the readme file located here:
https://github.com/arduino/ArduinoCore-samd/tree/master/bootloaders/zero
 
Last edited by mrdude,

frep

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

I've compiled the zero bootloader - but I changed the speed to 8mhz instead of 48mhz, this is untested by me but you can try this and see if it makes the usb work without using a crystal:

Code:
https://mega.nz/#!ZhJ0mS4Q!6x2goA5_MXLXnKeXkAb7vdtL_NZCWylV9aMLpej7HXM

The file above has this changed:
Code:
/* Master clock frequency */
#define CPU_FREQUENCY                     (8000000ul)
#define VARIANT_MCK                       CPU_FREQUENCY

/* Frequency of the board main oscillator */
#define VARIANT_MAINOSC                   (32768ul) #I probably should have changed this instead

I changed the CPU frequency, but I should have probably changed the main osc to 8000 instead, if you want to compile the bootloader yourself - change the file ArduinoCore-samd\bootloaders\zero\board_definitions_arduino_zero.h before you issue the make command.

I uploaded a bootloader with the cpu set to the default 48mHz, but the main oscillator changed to 8000 - it's probably worth trying that one first.

The file posted below has this changed:
Code:
/* Master clock frequency */
#define CPU_FREQUENCY                     (48000000ul)
#define VARIANT_MCK                       CPU_FREQUENCY

/* Frequency of the board main oscillator */
#define VARIANT_MAINOSC                   (8000ul)
Code:
https://mega.nz/#!doBUXK6Z!e3TqUgrb00b4sIQuM7dYetjlK6MXGseRydeRENwIqag

Also, read the readme file located here:
https://github.com/arduino/ArduinoCore-samd/tree/master/bootloaders/zero

@mrdude
Thanks for your input!
I was busy finishing the pcb. Now they are done and ordered (should arrive about 03.08.18). :-D
I will have a look at your files, once the programmer and the breakoutboards have arrived.
I'm a little sceptical about changing the VARIANT_MAINOSC , since I think it defines the frequency of the crystal. Since we have no crystal, defining it as 8MHz doesn't seem right.

Have you checked https://github.com/adafruit/uf2-samdx1/tree/master/boards/circuitplay_m0 ?

These are the uf2-bootloader of the adafruit boards. The circuitplay_m0 in particular has the same chip (SAMD21G18A) and has no crystal (see below). The board info file looks like this:

Code:
#ifndef BOARD_CONFIG_H
#define BOARD_CONFIG_H
#define CRYSTALLESS 1
#define VENDOR_NAME "Adafruit Industries"
#define PRODUCT_NAME "CPlay Express"
#define VOLUME_LABEL "CPLAYBOOT"
#define INDEX_URL "http://adafru.it/3333"
#define BOARD_ID "SAMD21G18A-CPlay-v0"
#define USB_VID 0x239A
#define USB_PID 0x0018
#define LED_PIN PIN_PA17
#define BOARD_NEOPIXEL_PIN PIN_PB23
#define BOARD_NEOPIXEL_COUNT 10
#endif

This could also be a good choice for a basic bootloader.
 
Last edited by frep,
  • Like
Reactions: mrdude

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
@frep
Yep I can see why you're sceptical, I read the data sheet for the sam21 and it says on that the internal oscillator is clocked at 8khz, you can fit an external oscillator though & the Arduino zero has this fitted (32.768khz) apparently to improve usb communication.

But not to worry - as said it's easy to dump the trinket bootloader and use that if all else fails - but it's good to have the source and be able to make your own bootloader :-)
 
  • Like
Reactions: frep

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
1ruaup.jpg
2i0vqz4.jpg


Looking at the trinket power circuit - it seems the voltage regulator en pin is connected to the voltage in from the USB and Bat power, disconnection of en pin from voltage in means you can connect the trinket to the battery power point instead of the capacitor you guys are soldering on to for your supply voltage. You could then just connect the trinket en pin to the power button, so when it's press the power button the trinket turns on - taking your finger off the button will make the trinket power off completely

Just saying !!!
 
Last edited by mrdude,
  • Like
Reactions: frep

mrdude

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

So I was able to dump the trinket bootloader with the raspberry pi using openocd:

2lo6w6s.jpg


You can add this line in your config if you want to dump the chip:

Code:
dump_image image.bin 0x0 0x2000

The file will be saved as image.bin - starting at the chip offset 0x0 and finishing at 0x2000 - this is just an example on how to dump, you could dump the entire chip contents (including payloads etc), by using this command:

Code:
dump_image image.bin 0x0 0x00040000

Then you can program your blank with the bootloader and payload in about a second :-), If you want the dump I'll upload if for you - just let me know.

***NOTE: Also remember once you program the bootloader - you need to hit reset twice within a second so the device will show up as a usb port, then you can copy the CURRENT.UF2/INDEX.HTM/INFO_UF2.TXT files to the TRINKETBOOT drive or flash with Arduino IDE. You need to put the circuit python files on if you want to access the usb drive without pressing reset twice. If you need those files let me know, although you can grab them from adafruit.


***Warning: Don't try and flash your trinket using the previous config file I gave you, you need to change the programming line to this: (or else it won't program and will erase the first few bytes from the chip)
Code:
flash write_image erase bootloader.bin 0x0

Also you might need to keep trying as there seems to be some sort of timing issue and seems to get worse with larger files, I had to keep pressing the up key and then enter - fast until I never got errors, and the chip started flashing. Maybe 1 out of 10 times it worked flashing the bootloader.
 
Last edited by mrdude,

mrdude

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

It's a bit late as you ordered your boards, but here's a slight design mod for your board - You could also supply power directly from the usb port to the chip if connected via a pc, that way the chip can be powered if there's any issues with flashing payloads, just a suggestion.

EDIT: Removed picture as I attached a new one in a later post.
 
Last edited by mrdude,

frep

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

It's a bit late as you ordered your boards, but here's a slight design mod for your board - You could also supply power directly from the usb port to the chip if connected via a pc, that way the chip can be powered if there's any issues with flashing payloads, just a suggestion.
f1jg1z.jpg

Hey MrDude!
Nice work with the dumping the bootloader! Also, thanks for explaining the 8KHz for the internal clock! Now, it sounds less wrong! :-)

... and yes, it is a little bit to late for design changes (one day) :-)
Anyway, about your suggestion:
You have to move the diode over the word „enable“. Current has to flow in the opposite direction. You have to put it in line with the two button transistors. 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).

I also like your suggestion about the trinket install. (Use capacitor signal only to feed the enable pin). But I have to say, it is not very simple to lift the pin. At least I broke the pin off, while modifying my trinket. I had then to replace the whole part. But as I already said, soldering isn’t my strength... :-D
 
  • Like
Reactions: mrdude

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Psionic Roshambo @ Psionic Roshambo:
    Double claymores to the face definitely kill a predator lol
  • BigOnYa @ BigOnYa:
    I went today and looked at a motorcycle someone was selling. I get there and the battery on it was dead, so the guy grabbed a battery charger and hooked it up. He plugged it into the wall, and the motorcycle sparked and started smoking. Come to find out the bike uses a 6 volt battery and the guy had the charger set to 12v. I said sorry to the dude and walked away. I felt bad for him tho.
  • Psionic Roshambo @ Psionic Roshambo:
    Sounds like it would be an exciting ride....
  • Psionic Roshambo @ Psionic Roshambo:
    Not sure I would want something on fire between my legs
  • BigOnYa @ BigOnYa:
    He ruined it basically. Sad cause it was a decent old bike. It would take more money to rewire the bike than it was worth tho.
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah I'm sure at minimum the starter was fried
  • Psionic Roshambo @ Psionic Roshambo:
    Alternator and battery
  • BigOnYa @ BigOnYa:
    Prob alot of fried parts. It was still smoking when I left.
  • K3Nv2 @ K3Nv2:
    I would've said show me how it rides
  • Psionic Roshambo @ Psionic Roshambo:
    I always wanted one of those Smart Cars with a Hyabusa motor in it.
  • K3Nv2 @ K3Nv2:
    I'm getting sick and tired of cheap ass baking pans now
  • BigOnYa @ BigOnYa:
    I think it be cool to have one that would fit in my pickup truck bed, then I could put down ramps n drive it off.
  • K3Nv2 @ K3Nv2:
    Used this one 5 times already impossible to clean
  • BigOnYa @ BigOnYa:
    You need the $900 copper coated ones, they are good for 10 times cooking before they are un cleanable
  • Psionic Roshambo @ Psionic Roshambo:
    Condoms are only meant to be used once Ken lol
  • K3Nv2 @ K3Nv2:
    Well damn that explains how you were born
  • BigOnYa @ BigOnYa:
    I tried Cavier for the first time today. That shit is nasty. Don't get why people like it.
  • Psionic Roshambo @ Psionic Roshambo:
    Eh it's good with Vodka and crackers
  • Psionic Roshambo @ Psionic Roshambo:
    Gotta have the whole experience
  • Psionic Roshambo @ Psionic Roshambo:
    Drink enough vodka so you can barely taste it
  • K3Nv2 @ K3Nv2:
    Depends on brand rich rich people spend like 500 a tin
  • Psionic Roshambo @ Psionic Roshambo:
    What I'm putting down is you gotta be trashed first lol
    Psionic Roshambo @ Psionic Roshambo: What I'm putting down is you gotta be trashed first lol