GD32VF103 SoC

GD32VF103 SoC is the first general RISC-V MCU from GigaDevice Semiconductor in the world which is based on Nuclei RISC-V Process Core.

If you want to learn more about it, please click https://www.gigadevice.com/products/microcontrollers/gd32/risc-v/

Overview

The GD32VF103 device is a 32-bit general-purpose micro controller based on the RISC-V core with best ratio in terms of processing power, reduced power consumption and peripheral set.

The RISC-V processor core is tightly coupled with an Enhancement Core-Local Interrupt Controller(ECLIC), SysTick timer and advanced debug support.

The GD32VF103 device incorporates the RISC-V 32-bit processor core operating at 108MHz frequency with Flash accesses zero wait states to obtain maximum efficiency.

It provides up to 128KB on-chip Flash memory and 32KB SRAM memory.

An extensive range of enhanced I/Os and peripherals connect to two APB buses.

The devices offer up to two 12-bit ADCs, up to two 12-bit DACs, up to four general 16-bit timers, two basic timers plus a PWM advanced timer, as well as standard and advanced communication interfaces: up to three SPIs, two I2Cs, three USARTs, two UARTs, two I2Ss, two CANs, an USBFS.

The SoC diagram can be checked as below GD32VF103 SoC Diagram

GD32VF103 SoC Diagram

GD32VF103 SoC Diagram

Supported Boards

In Nuclei SDK, we support the following four boards based on GD32VF103 SoC, see:

Usage

If you want to use this GD32VF103 SoC in Nuclei SDK, you need to set the SOC Makefile variable to gd32vf103.

Extra make variables supported only in this SoC:
  • SYSCLK: 108000000 by default, means 108MHz system clock will be selected during SystemInit function, it will define macro SYSTEM_CLOCK=$(SYSCLK) which is used in system_gd32vf103.c, such as SYSTEM_CLOCK=108000000.

  • CLKSRC: hxtal by default, available choices are hxtal and irc8m, means select to use HXTAL PLL or IRC8M PLL, it will define macro CLOCK_USING_$(CLKSRC), such as CLOCK_USING_HXTAL

  • USB_DRIVER: none usb driver is selected by default. You can choose device or host or both to select device, host or both driver source code, and in application code, user need to provide usb host or device initialization code and header files.

# Choose SoC to be gd32vf103
# the following command will build application
# using default gd32vf103 SoC based board
# defined in Build System and application Makefile
make SOC=gd32vf103 all

Note

  • Since this gd32vf103 SoC is a real chip, it is using Nuclei RISC-V N205 core, so the CORE is fixed to n205

  • If you want to use USB related functions of GD32VF103, you need add USB_DRV_SUPPORT = 1 in your application Makefile.

  • In the usb_conf.h file of GD32VF103 firmware library, you can configure the USB driver.