This is part 4 in the series where we compare the STM32F103 with its Chinese counterpart the GD32F103. Both are ARM Cortex M3 microcontrollers which are mostly pin, peripheral
and register compatible. Now we compare the SPI master peripheral of both chips. SPI is a serial protocol which is nicely explained in this wiki article. The typical use for SPI is high speed connections to memories, sensors or displays. Since I’m a display hurdler we settle for a display.

The first test we used the scope to check if all SPI modes (see this diagram from wiki for an overview of the SPI modes) are working as expected. After we verified them all working as expected we hooked up a display. It is a common 1.8″ TFT 160×128 which uses a ST7735R display controller. According to its datasheet it can operate up to 15MHz in SPI mode but we managed to overclock it up to 50+Mhz on the GD32! Besides the speed differences the display runs equally well on both the GD32 and STM32.

Since flickering a display isn’t that much interesting to watch I wrote a small intro. I have written several of those when I was a young kid so it was a nice walk down memory lane for me. However the displays lack several nice features such as sprites and other fancy stuff and things come to pure processor performance. See below for a crappy screencam of the scroller.

As always the code is in GitHub.

This post is part of a series where the STM32 is compared to the GD32:

Share this