Searching the prequisite Chinese websites to satisfy my shopping fetish I came across a neat litte ARM Cortex-M0 chip which is a extremely good bang for buck. It is the SWM050 made by Synwit, which, I believe, is the smallest chip available in a reasonable hand-solderable package (TSOP8). Other manufactures may have smaller package but they are the tiniest BGA chips which even I dont dare to solder.
– operates from 3.3v or 5V
– max 36Mhz using internal clock
– ARM Cortex-M0
– 8KB FLASH, 1KB SRAM
– 6/10 GPIO
– 2 32bit timers with PWM
– Watchdog timer
– (almost hobbyist) friendly tsop8 or tsop16 package
It has not got very impressive peripherals, but when it comes to its price it is a killer. In large quantities the chip will costs only a few dimes. With all these advantages there must be a big catch, and there is a major one: All info is in Chinese and chinese only, so a bit of creativity is needed here. Link to the original datasheet and platform libraries.
DirtyPCBs offers a cheap way to get (low resolution) photos of the die, a service I always wanted to check out. I send in the chip and got the 4 pictures back. They buy this service from a disclosed Chinese source, which main business is to provide pictures of the die to prove a chip is genuine and not a clone or old stock. They mainly focus on chip markings. Since I’m not a graphics artist I used the builtin tools in Windows 10 to ‘stich’ the pictures to one. I included the source pictures in my GitHub in case some else wants a go.
There is no standard/generic way of programming flash ROM of an ARM chip. All chip manufacturers provide their own tools and hardware to program it. As most of my ARM adventures uses the Blackmagic Probe I decided to add support for this chip into Blackmagic Probe. Unfortunately the datasheet doesn’t tell how to program its flash directly. According to the datasheet there must be some ROM present which contains the necessary subroutine. Digging around with the BMP in that memory area ( 0x100XXX) shows up nothing.
Luckily they provide a plugin for the JLINK JTAG Segger. These plugins contains a couple of binairy blobs that get loaded onto the device in order to program it. I downloaded their JLINK device package from the SYNWIT website and disassembled the flash programming stub included therein. I’m not that big expert in ARM thumb assembly so it took me about a day to figure it out. Disassembled file and pseudocode is found in my [Github].
The other effort I made is (a largely machine) translated set of .h files that describes all its 999+ registers, a crt0.s and makefile to get you started. Be sure to flash my version of the Blackmagic to be able to flash this chip. There is also a serial based bootloader buried somewhere in silicon but it requires the install of a vague Chinese application (shrug)..
I got a couple of these chips and designed a small breakout, which is available on my tindie store. The breakout consists of a small PCB which has the GPIO and programming pins conveniently broken out. Power is delivered through a micro USB connector, a couple of LEDs and switches to get you started immediately with all your blinky needs.
All source code, pcb files and photo’s are on my GitHub. Get your SMDprutser Synwit devboard here.
Nice to see.this chip working! It is amazingly cheap!
Where this ic may be bought?
You can get the development board from my Tindie store: https://www.tindie.com/products/Sjaak/small-arm-developmentboard/ or get it from lcsc.com
Does it contain any hardware support for serial / SPI / I2C?
The other useful one is lpc810
An arm in an 8pin dip package. Nice set of peripherals . When first released was under a pound in small quantities.
Which is out of production…
Where can I buy them? I find it only on taobao.
Thank you for your efforts in finding this and publishing too, definitely worth a look 🙂
Judging by the decap photos it looks like the die of a bigger IC in a smaller package.
there is a slightly larger package available (TSOP16) but that one only has 10 GPIOs. They wasted the other pins for extra Vdd/Vss pins. Dunno why they did this as it seems very wastfull
It’s nice to see another “almost” breadboardable ARM chip. The las time I used one was the LPC1114FN28.
Can I flash it with: https://kamami.pl/programatory-segger/565403-j-link-edu-mini-80891-programator-debugger-jtag-dla-mikrokontrolerow-arm-cortex-m.html?search_query=JLINK+JTAG+Segger&results=23 ?
I’d have tried to stitch the images in hugin, but couldn’t find the original images :/