HT32 Hetai microcontroller development environment construction and configuration tutorial

HT32 Holtek microcontroller development environment setup and installation tutorial

foreword

Recently, I am preparing for the Hetai Cup competition. I am watching the official PPT and data manual of Hetai to learn, and by the way, I will make a tutorial on how to build a development environment for Hetai MCU.

The development board issued by the Hetai Cup competition is ESK32-30501, and the single-chip microcomputer used is HT32F52352.

Hetai Cup official website address: https://url.zeruns.tech/S7xu8

Hetai official HT32F52352 teaching material PPT: https://url.zeruns.tech/r5Jt0 Extraction code: m9kj

Prepare

First, you need to install Keil MDK-ARM. I won’t go into details about this. Use Baidu, or read Hetai’s tutorial. Hetai provides Keil’s activation code, which can be used for Holtek’s Arm® Cortex-M0+ microcontroller series products, tutorials Link: https://url.zeruns.tech/kwuFg

I have packaged the software and firmware library needed below, download address: https://url.zeruns.tech/HT32 Extraction code: 55bv

Purchase address for things you need:

ESK32 development board: https://s.click.taobao.com/ndAFyKu

DAPLINK: https://s.click.taobao.com/Lt4FyKu

DuPont line: https://s.click.taobao.com/QVTFyKu

Environment build

Install the burning tool HT32 ICP Tool, e-Link32_Pro_ICP_Tool_v030.exe in the compressed package in the figure below, double-click to run and continue to the next step, the e-Link32 driver will be installed at the same time, then open the HT32 ICP Tool, connect the development board, and the software Select the MCU model in the lower right corner, click Read, and test whether it can be read normally.

This software can be downloaded from GEWtC official website: https://url.zeruns.tech/GEWtC


Install the Keil support package of HT32, Holtek.HT32_DFP.latest.pack in the HT32_STD_5xxxx_FWLib_V1.3.4_6737.zip compressed package, double-click to run and continue to the next step.


If it is other MCU of Hetai or if you want to download a new version, you can go to the official website: https://url.zeruns.tech/HT32F52352

Install the HT32 Virtual COM driver, which is the driver of the virtual serial port that comes with the e-Link32. Double-click the HT32_VCP_Driver_v121b.exe to run it, and continue to the next step.

Install HT32init, double-click HT32init_V109beta.exe to run, and continue to the next step. This is a software similar to STM32CubeMX, which can be configured graphically to generate code.



environmental inspection

So far, the environment is set up, you can now use the data cable to connect the Hetai MCU and the computer, then go back to the computer desktop, right-click the computer, select properties and then click the device manager on the left side of the interface, and then check if the figure appears display the result.


Then double-click the keil5 software, a pop-up may prompt you to detect a new support package, if not, you can click this button.


programming test

Finally, you need to build a project to check whether you can download the program to the Hetai MCU with one click. It may be difficult to build the project, but it doesn’t matter. You can change the official routine for testing. The official routine is in the HT32_STD_5xxxx_FWLib_V1.3.4_6737.zip In the firmware library package.

The firmware library usage tutorial is shown in the figure below

There are two LEDs on the ESK32-30501 development board that can be used for testing, and the corresponding ports are PC14 and PC15.

Modify the GPIO/Output routine in the official firmware library, modify the content shown in the red box in the figure below, compile and download to light up the LED.

Results as shown below.

The modified program is attached, and a delay program using the SysTick timer is added: https://url.zeruns.tech/CCJv2 Extraction code: 7p2r

recommended reading

Guess you like

Origin blog.csdn.net/u012513463/article/details/129460730