GigaDevice GD32F103 SimpleFOC compatibility

Amidst all that silicon shortage, a bit of good news. Due to SMT32F103 stock (and other) running dry and no sign of improving until 2023 I designed a small dev board with GD32F103 which I heard rumors is fully compatible with STM32F103.

I was able to program it using the official STM ST-Link V2, and loaded SimpleFOC built for the original STM32F103 and miraculously it worked. ST-Link recognized the GD chip as an original STM chip and just went in.

I’ve heard rumors that if you use other ways of programing (not STM’s Cube bare metal) it won’t work. I cannot confirm this. I’ve also heard rumors that ST-Link V3 won’t recognize it either. I have V3 but don’t have time to confirm this. May be later.

Anyways if anyone is considering alternatives to F103, apparently this is a viable one. The hardware layout is 100% identical, just replace the chip on your BOM.

The memory registers are also 100% identical AFAICT according to the documentation, which, again miraculously, is in English. I am sure there are quirks, but only extensive testing will tell at that point.

One thing you need to remember, GD’s chip runs at much higher frequency than ST’s (up to 120MHz) and the memory access is zero-wait so there may be problems w.r.t. timings, etc. I plan to test this but need to order one of my boards with the GD chip first. The upside is that GD’s chip is up to twice as fast as the F103, so silver lining there. And it’s three times cheaper. And available.

Edit: In Arduino IDE if you select the following you could program it like just another Arduino board.
Obviously you need to install Cube first.

3 Likes