Basic hardware knowledge and typical applications-STM32 replacement instructions-CKS32, HK32, MM32, APM32, CH32, GD32, BLM32, AT32 (recommended), N32, HC Huada series

Source code: https://gitee.com/yang456/learn-hardware.git

prompt

All manufacturers use M0, M3, and M4 cores.

Other manufacturers except BGI are compatible with STM32.

The main reason is that there are many people using STM32, and the registers are the same as STM32.

Or it is faster to directly refer to the STM32 register. This is also popular with the public.

Anyone who plays a single-chip microcomputer should know that as long as the register design is the same

So,,,,,hehehe...If the pins are the same again, then...hahaha...

 

CKS32 (Zhongkexin)

The STM32F103CBT6 used in the previous project, and the CKS32F103CBT6 used after the price increase

It's exactly the same, the circuit, the program and everything are the original STM32, and nothing needs to be changed! CKS32 is actually STM32.

It can be used directly as STM32.

CKS current model: (look at the previous CKS as STM)

 

 

 

 

HK32(Hangshun)

http://www.hsxp-hk.com/

Hang Shun has more choices, basically all STM32F0 series and F103 series have.

 

 

  

 

 

 The model I am using is HK32F103CBT6 and it is directly used as STM32F103CBT6.

The hardware circuit and software program are the original STM32. There is no problem at present.

 

Normal use steps

1. Go to the download center to download and use the underlying library provided by HK

 

 

 

 

2. The F1 series I use (according to my choice)

 

 

 

 

 

3. Download the development environment support package

 

 

 

Tip: If you use iar, please download the iar package

 

 

 

 

4. Put in the keil installation directory, double-click the left mouse button to install

 

 

 

 

 

 

5. The keil software will prompt whether to load, choose yes

 

 

6. There will be a selection of HK

 

 

 

7. If there is a problem with using it, you can directly replace the corresponding library file

Assuming there is a problem with flash

 

 

 

① Make a copy of the hk32f10x_flash.c file, and change the file name to stm32f10x_flash.c

 

 

②Open the file and change #include "hk32f10x_flash.h" to #include "stm32f10x_flash.h"

 

 

③Then replace the flash file of the previous STM32

 

 

 

 

 

MM (Smart Micro)

http://www.mindmotion.com.cn/

 

Looking at the source code provided, it should be exactly the same as STM32.

Why do you say that! Come and have a look

 

 

 

 

 

 

 Feel free to open a library function project

 

 

 

 

 

 

 

 

 

 

 

 

 

 

BLM (Batelite)

The chip of this manufacturer is the same as above, it can be used directly as STM32

BLM32F103R8T6 BLM32F103CBT6 BLM32F103RBT6, BLM32F103C8T6

 

 

 

 

 

AT32  Artery

https://www.arterytek.com/cn/index.jsp

Arteli is using M4 core, AT32F403A/F407/ F413/ F415/F421 series

Note that Ha is only the M4 core used, as long as the register is the same as F103, it is actually the same.

It's like F103 has a faster heart!

The price is also very tempting! The core selling price of M4 is the price of M0 and M3

https://at32.taobao.com/shop/view_shop.htm?spm=a1z09.2.0.0.11a52e8dT3zdYS&user_number_id=16896422

https://mnifdv.cn/resource/cnblogs/LearnHardware/ and STM32 or GD32 replacement instructions.xlsx

 

Assuming you want to replace STM32F103CBT6, use AT32F413CBT7

Assuming you want to replace STM32F103RET6, use AT32F403ARGT7

 

The software and hardware of the AT32F413 series have been tested to be compatible with the STM32F103 series!

The original STM32F103 software and hardware, nothing needs to be changed! It can run on AT32F413

 

 

If you want to use AT's own package, follow the instructions below to build the AT project

1. Download the development environment support package

https://www.arterytek.com/cn/product/AT32F407.jsp#Resource

 

 

 

I installed keil5, so install this

 

 

 

 

 

Download example

 

 

 

https://bbs.21ic.com/icview-3057208-1-1.html

 

 

 

N32 (National Technology)

https://www.nationstech.com/N32G020/

Mainly M0 and M4

 

 

 

 

 

 

HC Huada Series

Huada's single-chip microcomputer also uses ARM's M0 and M4 cores, but they encapsulate the registers themselves!!! So the library functions are not compatible with stm32

You can use the serial port to download and use stlink or jlink to download

No need to buy downloader separately! No need to buy downloader separately! No need to buy downloader separately!

 

Selection:

 

 

 

 

 

 

 

 

 

 

Development and program download instructions (assuming HC32L196 selected)

1. Unzip

 

 

 

Reference drawing board

 

 

 

2. Open the development environment support package

 

 

 

 

3. Take keil as an example

 

 

 

 

 

 

 

 

4. Put in the keil installation directory, double-click the left mouse button to install

 

 

 

 

 

 

 

 

  

7. Open the routine

 

 

 

 

 

 

8. Feel free to open one

 

 

 

9. Choose the model according to your own development board

 

 

10. If there is a problem with compilation, generally the header file path is not specified

Peripheral library file path

 

 

 

 

MCU startup and configuration file path

 

 

 

 

11. About downloading programs

The MCU download program uses two of these ports, which means that the serial port and the SWD download are shared.

Use serial port or use SWD to download depends on BOOT pin

Typical application circuit

 

 

 

12. Download using serial port

 

 

 

 

 

 

1. Hardware connection

 

 

 

 

 

 

 

Suppose I am using HC32L196, just look at the HC32x196x column

First connect BOOT0 to high level

Serial port module

RX        ----            PA14

TX        ----            PA13 

 

Suppose I am using HC32F005, just look at the HC32x00x column

HC32x00x This series of different chips have different download pins, we need to confirm

 

 

 

 

 

 

 

 

 

 

 

 

Looking for the SWD interface, because we know they are shared

 

 

 

 

and so:

Serial port module

RX        ----                       P31(UART0_TX)

TX        ----                       P27(UART0_RX)

GND     ----                      GND

RTS or DTR ---- RESET

 

2. Start downloading (HC32L196)

First connect BOOT0 to high level

Serial port module

RX        ----            PA14(UART0_TX)

TX        ----            PA13 (UART0_RX)

GND     ----            GND

Then reset the chip (RESETB is pulled low and then pulled high)

 

 

 

 

 

 

 

 

13. Use ST-Link or Jlink to download

In fact, it uses SWD method to download

1. Hardware connection

 

 

 

ST-Link or Jlink MCU

SWDIO      ----              PA13(SWDIO)

SWCLK ---- PA14 (SWCLK)

GND          ----              GND

 

2. Software selection downloader (take ST-Link as an example)

 

 

 

 

 

 

 

 

 

 

 

 

 

Generally, the software will automatically prompt the user which flash configuration file should be selected.

If you know which one to choose, choose yourself

 

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/qq_14941407/article/details/115025504