Close

Replicating the Trinket M0 Express Hack

A project log for PewPew FeatherWing

A shield for Adafruit Feather boards with buttons and a LED matrix display, for simple games.

dehipudeʃhipu 10/02/2017 at 21:474 Comments

It would be great to have more memory on PewPew, so I decided to try and replicate the Trinket M0 Express hack, only with my bare chip. To do that, I need a flash chip. The original hack used a S25FL116K0XMFI043 chip, but of course I don't have that. But they should all be pretty much the same, no? So I tried with a W25Q32FVSSIG instead:


The connections are pretty much what you would expect:


And the board definition is in this branch: https://github.com/pewpew-game/circuitpython/tree/trinket-m0-express

After compiling and flashing the firmware, it... doesn't work. I mean, the CircuitPython itself works and shows me the REPL console, but there is no USB disk. And it's easy to see why — there is a number of files in the boards directory that contain flash chip definitions, and that you include in your board definition files. And guess what, the chip I'm using is not there. So I have two options now: dive into the datasheets and prepare my own flash definition file, which would be the "correct" choice, or order a flash chip that is compatible with what is there already, then wait a few weeks for it to arrive and try again, which is the "lazy" choice. Guess which one I've chosen.

Since I'm waiting for the PCBs and parts for the next version of PewPew anyways...

Update: So I overcame by inherent laziness and created a flash file for the W25Q32BV family. And what do you know, it works!

Discussions

Amitabh Shrivastava wrote 01/10/2019 at 04:51 point

Does the hacked board support audioio by any chance? 

  Are you sure? yes | no

deʃhipu wrote 01/10/2019 at 11:54 point

Yes, of course. The audioio didn't exist back when I did it, but if you flash a more recent version of CircuitPython, it will work perfectly fine. I used it later in #µGame for sound.

  Are you sure? yes | no

davedarko wrote 10/03/2017 at 00:57 point

great job :)

  Are you sure? yes | no

deʃhipu wrote 10/03/2017 at 21:39 point

Thanks! I'm very excited about it, because it means that I can build a pretty powerful CircuitPython system with just 6 components (microcontroller+capacitor, flash+resistor, voltage regulator, usb socket) and use that in my other projects, like the robots. The extra flash space means I can include the library code frozen on the board. And extra file system space means I can store sound samples or graphics.

  Are you sure? yes | no