CH32V003 and Zephyr

CH32V003 and Zephyr

I’ve picked up a CH32V003 development board. Their claim to fame is being a RISC-V 32 bit microcontroller with 16 KiB of flash for $0.10 in quantity. I’d like to port Zephyr to it - there’s no good reason as the default Zephyr configuration is too big for 16 KiB of flash and 2 KiB of RAM, but stripped down it fits quite well.

I’ll update this post as I go along.

GPIOD traps

Be careful if you configure GPIOD at start up. The reset pin and SWD pin are both on GPIOD, and if you set them to output at startup then the chip can no longer be programmed.

My solution was to desolder and replace the chip.

Avatar
Michael Hope
Software Engineer