It's alive! (and with CircuitPython)

A project log for Thunder pack

A kick-ass powered ARM board with everything you need all in a compact package that fits in your pocket.

JeremyJeremy 03/26/2020 at 08:000 Comments

It took awhile to get here but the new STM32F411 chips are working really well! 

COVID aside

It has been so interesting to see how COVID has affected everything in such real ways. I say this because, most things come and go but don't really have this kind of Hollywood movie effect. So to see something stop so much is truly staggering and I'm in awe. (I'm also in week 2 of quarantine in San Francisco, so I might be a bit loopy). 

For perspective, here's what the streets of San Francisco have looked like lately.

I find my self comparing how surprised people are about COVID19 to climate change. People didn't expect a worldwide pandemic to actually happen...and here it is. So many people refuse to believe climate change can happen...but it's here and is happening; whether you believe it is or not.

All that to say, I placed PCB orders with DirtyPCBs and OSHPark in min February and it took about a month to get to my door. Longer than expected, but totally reasonable considering the circumstances. 

It also meant that my trip to the Open Hardware Summit was grounded and I attended virtually; just like everyone else.

Choosing chips

Bare PCBs to play with!!!

My goal with this batch was to get CircuitPython running on the boards. So I ordered 2 chips to try: STM32F412 and STM32F411. The F12s come with as much as 1Mb flash while the F411s top out at 512Kb. I know CircuitPython takes at least 256Kb of flash, so I wanted to test the chips side-by-side. Would 512Kb be enough space to load both the CircuitPython runtime and user programs? (It turns out all STM chips seem to be limited to 48Kb for user program space - source). 

The STM32F411 had plenty of room and ran CircuitPython really well. It's also a couple dollars cheaper and is way more common; so it's the clear winner.

Officially on CircuitPython!

I have to say, the CircuitPython engineers are phenomenal. I had a few issues getting the boards working and the devs on their discord server were super responsive and helped me out a lot.

Along the way I was even able to contribute a general fix back to the codebase and add non-volatile memory (EEPROM emulation) support to the library for the STM line of chips.

I'm now excited to say that the team behind CircuitPython have accepted my PR and Thunderpack is an official port in their repository!

Arduino on the way

I have a Github PR open with the stm32duino team to add the new version of the board & chip to their project. Hopefully that'll be added in their next version.

Next - Update Examples

Now that the big things are out of the way, the next step is to update all the existing examples, add CircuitPython examples and get a new round of boards. Unsurprisingly, the WS2812B/Neopixel examples are giving me some grief (The DMA to PWM code always seems to cause trouble). I'm hoping to get that all sorted this week.

Feel free to follow along in the STM32F4 branch in github.