GD32F103xx AN001 Software Migration Guide
GD32F103xx AN001 Software Migration Guide
GD32F103xx
ARM® Cortex™-M3 32-bit MCU
Application Note
AN001
GD32F103xx - AN001
Software Migration Guide
Table of Contents
1/7
GD32F103xx - AN001
Software Migration Guide
List of Figures
2/7
GD32F103xx - AN001
Software Migration Guide
1 Introduction
The objective of this application note is to explain how to migrate the software from different
MCU platform to GD32F103xx. The purpose of this document is not to provide detailed
information on the devices, but to highlight the differences between them.
After system reset, the HSI oscillator is selected as system clock. If the HSE oscillator is
used as the system clock, the switch from HSI to HSE occurs automatically. When the HSE
is powered up, it will not be released for use until the HSE crystal oscillator is stable. This
specific delay period is known as the oscillator “Start-up time”. As the HSE becomes stable,
an interrupt will be generated if the related bit in the register is set. At this point the HSE
clock can be used directly as the system clock source or the PLL input clock. If HSE is not
ready or a failure is detected on the HSE clock, the switch of system clock will not occur and
the system clock will switch to HSI oscillator.
Since the HSE oscillator startup time is different between the MCU platforms, the HSE
startup timeout value should be changed in the device specific header file (device.h) when
use GD32F103xx.
There is also difference of MCU Flash programming algorithm between the MCU platforms,
so you should use the relevant IDE project settings based on GD32F103xx for application.
In order to make Keil RealView MDK project work properly with GD32F103xx chip, two
modifications need to be made:
3/7
GD32F103xx - AN001
Software Migration Guide
Figure 1. HSE_STARTUP_TIMEOUT change in Keil IDE
Secondly, extract the “GD32F103xx KEIL IDE Config.rar” file to the “Keil/arm/flash”
folder, and add the new flash programming algorithm to the project, as illustrated in the
below screenshots.
In order to make IAR EWARM project work properly with GD32F103xx chip, two
modifications need to be made:
4/7
GD32F103xx - AN001
Software Migration Guide
Figure 3. HSE_STARTUP_TIMEOUT change in IAR IDE
Secondly, extract the “GD32F103xx IAR IDE Config.rar” file to the “IAR/arm/config”
folder, and select relevant device, as illustrated in the below screenshots.
It is recommend to use the link driver in the latest version of IAR software install pack.
5/7
GD32F103xx - AN001
Software Migration Guide
4 Revision history
6/7