Posts

ST Link v2 clone as a dev board

I got distracted and had a hack on using a STL Link v2 clone as a development board. There’s a lot to like: A Cortex-M3 STM32F103C8T processor with 64 KiB of flash and 20 KiB of RAM 4 I/O lines and a LED to blink Decent support in STM32duino with a DFU bootloader Comes in a case and plugs directly into a USB port ~$2/each The I/O is strange and limited but it’s enough to drive a RGB LED via PWM, drive a 40 RGB LED pHAT over SPI, and drive a 320x240 LCD over fast bitbanged SPI.

SDHC over SPI performance

I’m hacking on adding SDHC over SPI block device support to the Zephyr Project RTOS. I’m currently getting 224 KiB/s on an Arduino Zero with a 4 MHz bus and 1 KiB read size, which is an OK-ish 46 % of the top bus capacity.

The many different CRC16-CCITTs

I’m hacking on adding Arduino Zero support to the Zephyr Project at the moment. I had a look at speeding up crc16_ccitt() but ran into a problem: there’s so many variants of CRC16-CCITT to choose from!

OpenOCD with the ST-Link v2

There is an issue when trying to program a SAMD21 like in the Arduino Zero using OpenOCD with a ST-Link v2 which gives errors like this: ** Programming Started ** auto erase enabled Info : SAMD MCU: SAMD21E18A (256KB Flash, 32KB RAM) Error: Failed to erase row containing 00000000 Error: SAMD: failed to erase sector 0 Error: failed erasing sectors 0 to 0 The issue is that NVMCTRL_CTRLA is a half-word register and the ST-Link v2 emulates the half word write using two single byte writes.

SAMD21E18 PCB

In follow up to my mysensors.org build, I’ve always wanted to design PCB and try my hand at SMD soldering. I normally use veroboard on a 0.1" pitch but the time to cut and solder wires makes for a slow build.

MySensors

It gets warm and humid here in the summer and feels too dry in the winter. To measure this I built up two MySensors Sensebender Micro boards and designed a 3D printed a case to go with them:

Adventures in making PCBs

As part of adding MySensors based sensors around the house, I want to make an integrated version of the Sensebender Micro upgraded with a SAMD21 and a RFM69HCW radio. I’ve never had much success with making PCBs at home, so I thought I’d give it another try and record the experiments.

juju.net.nz/michaelh on IPFS

The short story is that this blog is now available on IPFS at https://juju.net.nz/ipns/juju.net.nz/michaelh/ and https://gateway.ipfs.io/ipns/juju.net.nz/michaelh/ This is done by generating the blog a second time with ipfs/ as the basepath, changing to relative links, and then adding and updating the name as part of the buildbot script.

Raspberry Pi Zero boot speed

I enjoy working on embedded systems, but there’s a significant amount of work you have to do in getting the platform ready before getting to the more interesting business logic. The Raspberry Pi Zero W solves most of these problems: it’s small, has decent I/O, a decent price ($10 + $6 for storage + $4 for shipping) and runs full Linux so I can use my current language of choice.

cxx17: working through Cracking the Coding Interview

I’m working my way through Cracking the Coding Interview as a way of learning the new features and tool ecosystem of C++17. Q1.9 reminded me of those games where you need to make a shape by drawing straight lines through dots.