supremeOne

Hangshun MCU HK32F030 minimum system development board

 
Overview

Hangshun MCU HK32F030 minimum system development board development record

Let’s take a look at the schematic diagram of the drawn circuit board. I really don’t know how to draw a board, so I just drew it blindly. The drawings on the board have no reference value!

 1. Software

1. The MCU of Hangshun's HK32F030 is very user-friendly. There is a plug-in package for this MCU in the attachment package below. You can download it and install it in keil.

2. After installing the device library, you can get the HK32F0XX_LibraryV1.0.8 file in the function library and unzip it. There will be a built example project under the templates file.(PS: Everyone should pay attention to the chip model)

3. The chip of my board should be selected as engineer hk32f030_STD. After opening, we only run the main file.

4. Since the first thing to do when lighting up is to initialize the GPIO pin, I will directly enter the code. void HK_EVAL_LEDInit(void) { //PC6 PC7   GPIO_InitTypeDef  GPIO_InitStructure;//声明一个结构体   /* 使能GPIO时钟 */   RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOC, ENABLE);   /*初始化LED的GPIO*/   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6|GPIO_Pin_7;   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;   /*设置GPIO速度为10M*/   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_Level_2;   GPIO_Init(GPIOC, &GPIO_InitStructure); } In this way, we will complete the GPIO initialization operation.

5. Write a delay function. The delay function here is the old solution. Also go directly to the code static __IO uint32_t TimingDelay; void Delay_ms(__IO uint32_t nTime) {     TimingDelay = nTime;     while(TimingDelay != 0); } void TimingDelay_Decrement(void) {     if (TimingDelay != 0x00)     {         TimingDelay--;     } } 6. Next we will write the control function of the LED light. void HK_EVAL_LED1Off(void) {   GPIOC->BSRR = GPIO_Pin_6;  }

void HK_EVAL_LED2Off(void) {   GPIOC->BSRR = GPIO_Pin_7;  } void HK_EVAL_LED1On(void) {   GPIOC->BRR = GPIO_Pin_6;     }

void HK_EVAL_LED2On(void) {   GPIOC->BRR = GPIO_Pin_7;     }

7. After that, let’s create a small main function

int main(void) { /* 设置系统时钟为1ms(就是SysTick Timer) */ if (SysTick_Config(SystemCoreClock / 1000)) {   /* 如果没设置成功直接死循环 */ while (1); } //初始化IO口 HK_EVAL_LEDInit(); /*开始死循环*/ while(1) {     Delay_ms(250);     HK_EVAL_LED1On();     HK_EVAL_LED2Off();     Delay_ms(250);     HK_EVAL_LED1Off();     HK_EVAL_LED2On();   } }

8. Come and start compiling! ! ! ! ! ! !

".Objectshk32f030_STD.axf" - 0 Error(s), 0 Warning(s).

I hope you can also see this situation above


9. Come and download!

I gave Chuangxin Workshop a PowerWriter here, so I used it to study it. Now I’ll talk about the process.

The example of the wiring of the downloader to the chip is given in the core creation workshop as shown in the figure 7fec5e6aab389d5dd85c9772ab66f34.png

My wiring is: a4ad8e0c21b566166e5bfcaa0a99450.png First, go to the official website of Innovation Workshop to download the software and give the address: https://www.icworkshop.com/user/btDetails/pw/7 After the installation is complete, open the software as shown in the figure, 7166437ff2bfbeee4c4580d1651504c.png click to select the chip b395013cf87bdb4b10b33417d836a21.png , and then click Apply a74b72309dc22b31a24d2cc7b1794b3.png to connect. Come down and add our hex file. ce5e79aad8e1898a7fb5fdfeec91b49.pngc9367380fa2e17cedb5a27a3d4f0235.png3c608386b94e44acd0694682f94103d.png050acbaaff60da8b14b27f9d6603ded.png4fd38469e6d5c06d27b6adf1069dd87.png11c984dd6a1939d2824481b2d08a823.png Adding the file here is done. Next we start burning.

a3116c03040df0dfe113d81d943be04.pngd040f1853f1a12ca35b0956c34bbf4c.png


If all goes well, your LED light should be buzzing ! ! ! ! ! !



Finally, I wish you all the best and good luck. I also hope that I, who failed the postgraduate entrance examination, had no love in college, and cannot find a job after graduation, can get an offer!

Of course, if you are the boss of a certain company and you like my technology, you are welcome to contact me and send me an offer! ! ! !

ps: If any young lady likes me, she is also welcome







参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-09 08:32:32
  • ARM Novice Advanced
  • 51 MCU modbus protocol problem
  • LED Controller
  • Mind wheelchair
  • Several common problems with infrared cameras (transferred)
  • The McBSP interface of VC5509A can configure

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号