Explorar o código

DC:4+4,开关检测。

liyi hai 1 ano
pai
achega
6284b5f5d3

+ 24 - 12
control/PDU-DC/App/ADC/ADC.c

@@ -36,11 +36,20 @@
 *********************************************************************************************************/
 bool adc_data_ok_flag = false;
 uint8_t adc_sample_n;//采样次数
+#if SUPPORT_2_V_GA_CHN
 uint16_t adc_original_value[ADC_CH_N+ADC_V_CHN]={0};//存放各通道原始值
 uint16_t adc_calc_value[ADC_Avg_N][ADC_CH_N+ADC_V_CHN];//各通道中间过程计算值
 uint32_t adc_Avg_value[ADC_CH_N+ADC_V_CHN];//存放各通道平均值
-
 extern uint16_t adc_data_zero[ADC_CH_N+ADC_V_CHN];
+#else
+
+uint16_t adc_original_value[ADC_CH_N]={0};//存放各通道原始值
+uint16_t adc_calc_value[ADC_Avg_N][ADC_CH_N];//各通道中间过程计算值
+uint32_t adc_Avg_value[ADC_CH_N];//存放各通道平均值
+extern uint16_t adc_data_zero[ADC_CH_N];
+#endif
+
+
 /*********************************************************************************************************
 *                                              内部函数声明
 *********************************************************************************************************/
@@ -79,7 +88,7 @@ void ConfigADCGPIO(void)
     //配置ADC时钟
     rcu_adc_clock_config(RCU_ADCCK_APB2_DIV6);
   //设置GPIO为ADC接口 
-#if NO_USE_IM1253E
+#if SUPPORT_2_V_GA_CHN
 		gpio_mode_set(ADC_0_5_IO, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, ADC_ch0|ADC_ch1|ADC_ch2|ADC_ch3|ADC_ch4|ADC_ch5|ADC_Vol_ch1|ADC_Vol_ch2);
 #else
 	gpio_mode_set(ADC_0_5_IO, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, ADC_ch0|ADC_ch1|ADC_ch2|ADC_ch3|ADC_ch4|ADC_ch5);//ADC通道3和4用于串口通信,所以扩展用了ADC通道9和10
@@ -95,7 +104,7 @@ void ConfigADCGPIO(void)
 	adc_external_trigger_source_config(ADC_REGULAR_CHANNEL,ADC_EXTTRIG_REGULAR_NONE);//配置ADC外部触发是软件触发
 	adc_data_alignment_config(ADC_DATAALIGN_RIGHT);//配置ADC数据对齐方式是右对齐
 	adc_resolution_config(ADC_RESOLUTION_12B);//配置ADC为12位
-#if NO_USE_IM1253E
+#if SUPPORT_2_V_GA_CHN
 	adc_channel_length_config(ADC_REGULAR_CHANNEL, ADC_CH_N+ADC_V_CHN);
 	adc_regular_channel_config(8U, ADC_CHANNEL_3, ADC_SAMPLETIME_55POINT5);
 	adc_regular_channel_config(9U, ADC_CHANNEL_2, ADC_SAMPLETIME_55POINT5);
@@ -148,8 +157,8 @@ void ADC_dma_config(void)
     dma_data_parameter.periph_width = DMA_PERIPHERAL_WIDTH_16BIT;//设置DMA从外设中读出数据的位数,因为ADC转换后的数值是12位,用16位数值表示,所以这里设置为1字
     dma_data_parameter.memory_width = DMA_MEMORY_WIDTH_16BIT;  //设置DMA存入存储器的数据位数
     dma_data_parameter.direction    = DMA_PERIPHERAL_TO_MEMORY;//设置DMA的数据传输方向
-#if NO_USE_IM1253E
-	dma_data_parameter.number       = ADC_CH_N + ADC_V_CHN;
+#if SUPPORT_2_V_GA_CHN
+		dma_data_parameter.number       = ADC_CH_N + ADC_V_CHN;
 #else
     dma_data_parameter.number       = ADC_CH_N;//设置DMA一个周期要传输的数据个数,用了8个通道的ADC,所以在一个周期内要传输8个数据
 #endif
@@ -193,7 +202,7 @@ uint32_t DC_I_calfunction(uint16_t da)
 		return 0;
 	}
 }
-#if NO_USE_IM1253E
+#if SUPPORT_2_V_GA_CHN
 uint32_t DC_V_calfunction(uint16_t va)
 {
 	uint32_t temp_i = 0;
@@ -244,9 +253,11 @@ uint32_t DC_V_calfunction(uint16_t va)
 * 创建日期:2024年04月06日
 * 注    意:
 *********************************************************************************************************/
-
+#if SUPPORT_2_V_GA_CHN
 static uint16_t sort_buff[ADC_CH_N+ADC_V_CHN][ADC_Avg_N] = {0};
-
+#else
+static uint16_t sort_buff[ADC_CH_N][ADC_Avg_N] = {0};
+#endif
 
 static void buff_sort(uint16_t *arr,int num)
 {
@@ -282,6 +293,7 @@ static uint32_t calculate_all(uint16_t *arr,int num)
 void read_adc_val(void)
 {
 	int8_t i = 0;
+
 	if(adc_sample_n < ADC_Avg_N)
 	{
 		for(i = 0;i < ADC_CH_N ;i++)
@@ -289,9 +301,9 @@ void read_adc_val(void)
 			 sort_buff[i][adc_sample_n] = adc_original_value[i];
 				//adc_Avg_value[i] += adc_original_value[i];
 		}
-#if NO_USE_IM1253E
-		 sort_buff[ADC_VOL][adc_sample_n] = (uint16_t)(abs(adc_original_value[ADC_VOL] - adc_original_value[ADC_VOL+1]));
-		//adc_Avg_value[ADC_VOL] += (uint16_t)(abs(adc_original_value[ADC_VOL] - adc_original_value[ADC_VOL+1]));
+
+#if SUPPORT_2_V_GA_CHN 
+		adc_Avg_value[ADC_VOL] += (uint16_t)(abs(adc_original_value[ADC_VOL] - adc_original_value[ADC_VOL+1]));
 #endif
 		adc_sample_n++;
 	}
@@ -318,7 +330,7 @@ void read_adc_val(void)
 				adc_Avg_value[i] = 0;
 			}
 		}
-#if NO_USE_IM1253E
+#if SUPPORT_2_V_GA_CHN
 		//adc_Avg_value[ADC_VOL] = adc_Avg_value[ADC_VOL] / ADC_Avg_N;
 		uint16_t *arr = &sort_buff[ADC_VOL][0];
 		buff_sort(arr,ADC_Avg_N);

+ 10 - 2
control/PDU-DC/App/ADC/ADC.h

@@ -22,6 +22,7 @@
 #include "gd32e230x_conf.h"
 #include "SysTick.h"
 #include "ADC.h"
+#include "board_cnf.h"
 /*********************************************************************************************************
 *                                              宏定义
 *********************************************************************************************************/
@@ -29,7 +30,12 @@
 #define ADC_V_Gain   4020    //实际 200.9   扩大2009
 #define ADC_Fulscale 4096 //ADC满量程值,12位,即4096
 #define I_sens       1  //实际电流传感器的灵敏度,单位是V/A,扩大成1
-#define A_gain       3  //电压放大倍数
+
+#if SUPPORT_STM32_ADC
+	#define A_gain       1  //电压放大倍数
+#else
+	#define A_gain       3  //电压放大倍数
+#endif
 #define ADC_CH_N    8   //通道数
 #define ADC_Avg_N   12   //平均次数
 #define ADC_0_5_RCU RCU_GPIOA
@@ -47,7 +53,7 @@
 #define ADC_ch6 GPIO_PIN_0
 #define ADC_ch7 GPIO_PIN_1
 
-#if NO_USE_IM1253E
+#if SUPPORT_2_V_GA_CHN
 #define ADC_Vol_ch1	 GPIO_PIN_2
 #define ADC_Vol_ch2  GPIO_PIN_3
 #endif
@@ -60,7 +66,9 @@ void Init_ADC(void);
 void ConfigADCGPIO(void);
 void ADC_dma_config(void);
 uint32_t DC_I_calfunction(uint16_t da);
+#if SUPPORT_2_V_GA_CHN
 uint32_t DC_V_calfunction(uint16_t va);
+#endif
 void read_adc_val(void);
 #endif
 

+ 60 - 0
control/PDU-DC/App/CH442E/ch442e.c

@@ -0,0 +1,60 @@
+#include "ch442e.h"
+
+#include "gd32e230x_conf.h"
+
+
+
+
+#if SUPPORT_STM32_ADC
+
+
+
+#define     CH442E_GPIO           GPIOA
+#define     CH442E_RCU            RCU_GPIOA
+#define     CH442E_IN_GPIO				GPIO_PIN_15
+#define 		CH442E_EN_GPIO				GPIO_PIN_12
+
+
+
+
+
+#define      CHOISE_STM32_1			gpio_bit_reset(CH442E_GPIO, CH442E_IN_GPIO)
+
+#define      CHOISE_STM32_2			gpio_bit_set(CH442E_GPIO, CH442E_IN_GPIO)
+
+
+void che442e_Init(void)
+{
+	rcu_periph_clock_enable(CH442E_RCU); 
+	gpio_mode_set(CH442E_GPIO, GPIO_MODE_OUTPUT, GPIO_PUPD_PULLDOWN, CH442E_IN_GPIO | CH442E_EN_GPIO);
+	gpio_bit_set(CH442E_GPIO, CH442E_IN_GPIO);
+	gpio_bit_reset(CH442E_GPIO, CH442E_EN_GPIO);
+}
+
+
+
+
+
+void che442_change_ch(uint8_t channel)
+{
+	switch(channel)
+	{
+		case STM32_ADC_V_1:
+			CHOISE_STM32_1;
+		break;
+		case STM32_ADC_V_2:
+			CHOISE_STM32_2;
+		break;
+		default:
+			break;
+	}
+}
+
+
+
+
+
+
+
+
+#endif

+ 34 - 0
control/PDU-DC/App/CH442E/ch442e.h

@@ -0,0 +1,34 @@
+#ifndef __CH442E_H_
+#define __CH442E_H_
+
+#include "stdint.h"
+#include "board_cnf.h"
+
+
+
+#if SUPPORT_STM32_ADC
+
+
+enum{
+	STM32_ADC_V_1 = 0,
+	STM32_ADC_V_2,
+};
+
+
+
+
+
+
+
+
+
+
+void che442e_Init(void);
+void che442_change_ch(uint8_t channel);
+
+#endif
+
+
+
+#endif
+

+ 120 - 44
control/PDU-DC/App/Main/Main.c

@@ -38,6 +38,8 @@
 #include <stdbool.h>
 #include "ADC.h"
 #include "Fwdgt.h"
+#include "ch442e.h"
+#include "detection.h"
 /*********************************************************************************************************
 *                                              宏定义
 *********************************************************************************************************/
@@ -112,7 +114,22 @@ uint8_t RL_Now_state[RELAY_ChN_default] = {0};
 
 
 uint16_t Devid_IDChalNum = 0;//设备类型和通道数
+
+
+#define ADC_VOL 8
+
+
+#if SUPPORT_2_V_GA_CHN
 uint16_t adc_data_zero[ADC_CH_N+ADC_V_CHN]= {0};
+#else
+uint16_t adc_data_zero[ADC_CH_N]= {0};
+#endif
+
+
+#if SUPPORT_DETECTION
+uint8_t detection_value = 0;
+#endif
+
 
 uint32_t DCPDU_Iout_Zero[RELAY_ChN_default] = {0};
 uint32_t DCPDU_Modbus_Reg[DCPDU_Modbus_Reg_len] = {0};
@@ -125,8 +142,14 @@ extern uint8_t ch_cnt;
 extern uint8_t Eeprom_Rbuf[RELAY_para_sum + 1];
 extern uint8_t	Rx_Data_buff_IM1253E[UART1_BUF_SIZE];
 extern uint32_t RL_delay_Limit[RELAY_ChN_default];
+#if SUPPORT_2_V_GA_CHN
 extern uint32_t adc_Avg_value[ADC_CH_N+ADC_V_CHN];//存放各通道平均值
 extern uint16_t adc_original_value[ADC_CH_N+ADC_V_CHN];
+#else
+extern uint32_t adc_Avg_value[ADC_CH_N];//存放各通道平均值
+extern uint16_t adc_original_value[ADC_CH_N];
+#endif
+
 extern uint32_t Modbus_Wr_buff[Mb_Wcmd_Width][Mb_Wcmd_len];
 extern uint32_t RL_delay_cnt[RELAY_ChN_default];
 /*********************************************************************************************************
@@ -180,14 +203,25 @@ static  void  InitHardware(void)
 	Init_74hc573();				 //初始化74hc573锁存器
 	Init_74hc595();       //初始化74hc595
 	InitTimer();         //初始化Timer模块
-#if NO_USE_IM1253E
+
+#if SURPPOT_ALL_ON_ALL_OFF
 	IoInit();
-#else
+#endif
+	
+
+	
+#if SUPPORT_STM32_ADC
+	InitUART1(115200);
+#elif SUPPORT_IM1253E
 	InitUART1(IM1253E_bd);     //初始化UART1模块 电能计量芯片默认的波特率,偶校验
 #endif
+
 	InitAT24Cxx();			 //初始化24C64模块	
 	ReadEeprom();
 	Init_ADC();
+#if SUPPORT_DETECTION
+	detection_Init();
+#endif
 	Delay_Ms_1 = 0;
 }
 
@@ -205,40 +239,18 @@ static void key_io_control()
 		
 		if(rst)
 		{
-//			for(int i = 0; i <RELAY_ChN_default;i++)
-//			{
-//				uint8_t temp0 = 0x01 << i;
-//				Relayx_Onoff_state(i,RELAY_OFF);
-//				temp0 = ~temp0;
-//				DCPDU_Modbus_Reg[Mb_Dbuff_RL_ST_Addr] &= temp0;
-//			}
-//			while(RL_Allon_flag == true)
-//					DelayNms(5);
-#if Eight_light
+#if SUPPORT_EIGHT_LIGHT
 			RL_Rx_state = 0x80;
 #else
 			RL_Rx_state = 0x00;
 #endif
 			RL_Alloff_flag = true;
-			//DelayNms(5);
 			
 		}else
 		{
-//			while(RL_Alloff_flag == true)
-//					DelayNms(5);
 			RL_Rx_state = 0xff & Active_state_bit;
 			RL_Allon_flag = true;
-			//DelayNms(5);
-//			for(int i = 0; i <RELAY_ChN_default;i++)
-//			{
-//				uint8_t temp0 = 0x01 << i;
-//				Relayx_Onoff_state(i,RELAY_ON);
-//				DCPDU_Modbus_Reg[Mb_Dbuff_RL_ST_Addr] |= temp0;
-//			}
 		}
-		//Eeprom_Rbuf[ERom_RL_ST_Addr] = DCPDU_Modbus_Reg[Mb_Dbuff_RL_ST_Addr] & Active_state_bit;
-//		RL_Rx_state = Eeprom_Rbuf[ERom_RL_ST_Addr];
-	//	Write_74hc573();
 	}
 }
 
@@ -262,7 +274,7 @@ static  void  CHK_JLINK(void)
 	uint8_t temp1 = 0;
 	uint8_t t_RL_st_old = 0;
 	uint8_t t_RL_st_new = 0;
-#if NO_USE_IM1253E
+#if (SUPPORT_IM1253E == 0)
 #else
 	if(gpio_input_bit_get(CHECK_JLINK_IO,CHECK_JLINK_IN) == 0)//如果有jlink接入,则不会动作继电器,直接跳出进入主函数
 #endif
@@ -355,7 +367,7 @@ static  void  CHK_JLINK(void)
 				}
 				else if(RL_OFF_flag[i] > 0)
 				{
-#if Eight_light
+#if SUPPORT_EIGHT_LIGHT
 					if(i != 7){
 						Relayx_Onoff_state(i,RELAY_OFF);
 						temp0 = ~temp0;
@@ -482,7 +494,7 @@ static void fault_state_process(uint8_t chn)
 
 static void RL_Over_Func()
 {
-	
+#if (SUPPORT_STM32_ADC == 0)
 	if(DCPDU_All_Over_Func)
 	{
 		for(int i = 0; i <RELAY_ChN_default;i++)
@@ -498,6 +510,7 @@ static void RL_Over_Func()
 		DCPDU_All_Over_Func = 0;
 		return;
 	}
+#endif
 	for(int i = 0; i <RELAY_ChN_default;i++)
 	{
 		if(DCPDU_OverFunc[i])
@@ -673,18 +686,54 @@ int main(void)
 	{
 		LimiT_enable_check(i,DCPDU_Modbus_Reg[Mb_Dbuff_CH1ST_FT_Addr+i]);
 	}
-#if Eight_light
+#if SUPPORT_EIGHT_LIGHT
 	Relayx_Onoff_state(7,RELAY_ON);
 #endif
 	Fwdgt_Init();
+#if SUPPORT_DETECTION
+		detection_value = get_detection();
+#endif
 	while(1)
 	{
+		
+#if SUPPORT_DETECTION
+		if((detection_value & 0x1) == 0)
+		{
+			for(int i = 0; i <RELAY_ChN_default / 2;i++)
+			{
+
+					uint8_t temp0 = 0x01 << i;
+					Relayx_Onoff_state(i,RELAY_OFF);
+					temp0 = ~temp0;
+					DCPDU_Modbus_Reg[Mb_Dbuff_RL_ST_Addr] &= temp0;
+					//E
+					//AT24CxxWriteOneByte(ERom_RL_ST_Addr,Eeprom_Rbuf[ERom_RL_ST_Addr]);
+			}
+			Eeprom_Rbuf[ERom_RL_ST_Addr] = DCPDU_Modbus_Reg[Mb_Dbuff_RL_ST_Addr] & Active_state_bit;
+			RL_Rx_state = Eeprom_Rbuf[ERom_RL_ST_Addr];
+			Write_74hc573();
+		}
+		if((detection_value & 0x2) == 0)
+		{
+			for(int i = RELAY_ChN_default / 2; i <RELAY_ChN_default;i++)
+			{
+
+					uint8_t temp0 = 0x01 << i;
+					Relayx_Onoff_state(i,RELAY_OFF);
+					temp0 = ~temp0;
+					DCPDU_Modbus_Reg[Mb_Dbuff_RL_ST_Addr] &= temp0;
+					//E
+					//AT24CxxWriteOneByte(ERom_RL_ST_Addr,Eeprom_Rbuf[ERom_RL_ST_Addr]);
+			}
+			Eeprom_Rbuf[ERom_RL_ST_Addr] = DCPDU_Modbus_Reg[Mb_Dbuff_RL_ST_Addr] & Active_state_bit;
+			RL_Rx_state = Eeprom_Rbuf[ERom_RL_ST_Addr];
+			Write_74hc573();
+		}
+#endif
 		CHK_JLINK();
 		Fwdgt_reload();
 		eMBPoll();
-#if NO_USE_IM1253E
-		
-#else	
+#if SUPPORT_IM1253E
 		if(Read_IM1253E_flag)//定时读1253
 		{
 			Read_IM1253E_flag = false;
@@ -770,6 +819,7 @@ int main(void)
 		}
 #endif
 
+
 		if(read_adc_flag == 1)
 		{
 			read_adc_val();
@@ -779,9 +829,13 @@ int main(void)
 		{
 			LEDFlicker2();
 			Clr1SecFlag();  //清除1s标志
+#if SUPPORT_DETECTION
+		detection_value = get_detection();
+#endif
 			//read_adc_val();//定时读取ADC的数据
 			//输出耗电量计算。累计。
-#if NO_USE_IM1253E
+			
+#if (SUPPORT_IM1253E == 0)
 				uint32_t kWh_in = 0;
 #endif
 			for(i = 0;i < DCPDU_active_chn;i++)
@@ -795,7 +849,7 @@ int main(void)
 				TotalWh[i] = temp_w + TotalWh[i];//累计电量,初值为0
 
 				DCPDU_Modbus_Reg[temp0 + Mb_Dbuff_P1Output_Addr + 3] = (uint32_t)TotalWh[i];
-#if NO_USE_IM1253E
+#if (SUPPORT_IM1253E == 0)
 				kWh_in += DCPDU_Modbus_Reg[temp0 + Mb_Dbuff_P1Output_Addr + 3];
 #endif
 				if(DCPDU_Modbus_Reg[temp0 + Mb_Dbuff_P1Output_Addr + 3] > 0xfffffffe)
@@ -811,7 +865,7 @@ int main(void)
 				Eeprom_Rbuf[ERom_TotalWh1_Addr + temp0 + 3] = DCPDU_Modbus_Reg[temp0 + Mb_Dbuff_P1Output_Addr + 3];
 				AT24CxxWrite(ERom_TotalWh1_Addr + temp0,(Eeprom_Rbuf + ERom_TotalWh1_Addr + temp0),4);
 			}
-#if NO_USE_IM1253E
+#if (SUPPORT_IM1253E == 0)
 			DCPDU_Modbus_Reg[Mb_Dbuff_KWhInput_Addr] = kWh_in;
 			DC_BASE[3] = DCPDU_Modbus_Reg[Mb_Dbuff_KWhInput_Addr];
 #endif
@@ -825,19 +879,35 @@ int main(void)
 		{
 			adc_data_ok_flag = false;
 			//read voltage
-#if NO_USE_IM1253E
+#if (SUPPORT_IM1253E == 0)
 			uint32_t I_in = 0;
 			uint32_t W_in = 0;
+#if SUPPORT_STM32_ADC
+			uint32_t voltage_chi_1 = read_voltage(STM32_ADC_V_1) *1000;
+			uint32_t voltage_chi_2 = read_voltage(STM32_ADC_V_2) *1000;
+			DCPDU_Modbus_Reg[Mb_Dbuff_VInput_Addr] = voltage_chi_1 > voltage_chi_2 ? voltage_chi_1 : voltage_chi_2;
+#else
 			DCPDU_Modbus_Reg[Mb_Dbuff_VInput_Addr] = DC_V_calfunction(adc_Avg_value[ADC_VOL]);
+			adc_Avg_value[ADC_VOL] = 0;	
+#endif		
 			DC_BASE[0] = DCPDU_Modbus_Reg[Mb_Dbuff_VInput_Addr];
-			adc_Avg_value[ADC_VOL] = 0;		
+				
 #endif
 			//for(i = 0;i < ADC_CH_N;i++)
 			for(i = 0;i < DCPDU_active_chn;i++)
 			{
 				temp0 = 4*i;
-#if NO_USE_IM1253E
+#if SUPPORT_STM32_ADC
+				if(i >=4)
+				{
+					DCPDU_Modbus_Reg[Mb_Dbuff_P1Output_Addr + temp0] = voltage_chi_2;
+				}else
+				{
+					DCPDU_Modbus_Reg[Mb_Dbuff_P1Output_Addr + temp0] = voltage_chi_1;
+				}
+#else				
 				DCPDU_Modbus_Reg[Mb_Dbuff_P1Output_Addr + temp0] = DCPDU_Modbus_Reg[Mb_Dbuff_VInput_Addr];
+#endif
 				if(DCPDU_Modbus_Reg[Mb_Dbuff_VInput_Addr] > DCPDU_Modbus_Reg[Mb_Dbuff_VLit1_max_Addr + i])
 				{
 					Fault_state_V |= temp2;
@@ -849,14 +919,14 @@ int main(void)
 						Fault_state_V &= temp1;
 					}
 				}
-#endif
+
 				DCPDU_Modbus_Reg[temp0 + Mb_Dbuff_P1Output_Addr + 1] = DC_I_calfunction(adc_Avg_value[i]);//输出电流
 				
 				
 				if(Load_conn_end_flag)//负载加载以后再检测电流
 				{
 					temp2 = 0x01 << i;
-#if NO_USE_IM1253E
+#if (SUPPORT_IM1253E == 0)
 					I_in += DCPDU_Modbus_Reg[temp0 + Mb_Dbuff_P1Output_Addr + 1];
 #endif
 					if(DCPDU_Modbus_Reg[temp0 + Mb_Dbuff_P1Output_Addr + 1] > DCPDU_Modbus_Reg[Mb_Dbuff_ILit1_max_Addr + i])
@@ -880,14 +950,14 @@ int main(void)
 				temp_p = temp_v * temp_i;
 		
 				DCPDU_Modbus_Reg[temp0 + Mb_Dbuff_P1Output_Addr + 2] = temp_p / 10;
-#if NO_USE_IM1253E
+#if (SUPPORT_IM1253E == 0)
 				W_in += DCPDU_Modbus_Reg[temp0 + Mb_Dbuff_P1Output_Addr + 2];
 #endif
 				adc_Avg_value[i] = 0;
 
 			}
 			Fault_state_Reg = Fault_state_V | Fault_state_I;
-#if NO_USE_IM1253E		
+#if (SUPPORT_IM1253E == 0)		
 			DCPDU_Modbus_Reg[Mb_Dbuff_IInput_Addr] = I_in;
 			DC_BASE[1] = DCPDU_Modbus_Reg[Mb_Dbuff_IInput_Addr];
 			DCPDU_Modbus_Reg[Mb_Dbuff_WInput_Addr] = W_in;
@@ -909,7 +979,7 @@ int main(void)
 		}
 		RL_Over_Func();
 		MODbus_CMD();//MODBUS命令池处理。
-#if NO_USE_IM1253E
+#if SURPPOT_ALL_ON_ALL_OFF
 		key_io_control();
 #endif
 	}
@@ -1261,8 +1331,12 @@ void Init_Dev_parameter(void)
 	{
 		adc_data_zero[i] = adc_original_value[i];
 	}
-#if NO_USE_IM1253E
+#if (SUPPORT_IM1253E == 0)
+	
+#if SUPPORT_ADC_GATHER_V
 	adc_data_zero[ADC_VOL] = adc_original_value[ADC_VOL] = 0x01;
+#endif
+
 #else
 	Init_IM1253E_flag = true;
 	while(Init_IM1253E_flag)
@@ -1341,3 +1415,5 @@ void __aeabi_assert(const char * x1, const char * x2, int x3)
 	(void)x3;
 }
 #endif
+
+

+ 2 - 4
control/PDU-DC/App/Main/Main.h

@@ -21,11 +21,11 @@
 *********************************************************************************************************/
 #include  "stdbool.h"
 #include "gd32e230x_conf.h"
+#include "board_cnf.h"
 /*********************************************************************************************************
 *                                              宏定义
 *********************************************************************************************************/
 #define DCPDU_Modbus_Reg_len       300     //modbus寄存器长度
-#define RELAY_ChN_default          7       //所用通道数,默认值
 #define RELAY_ontime_default       0       //继电器开通延时默认及最小值
 #define RELAY_ontime_max           99      //继电器开通延时最大值
 #define RELAY_offtime_default      0       //继电器断开延时默认及最小值
@@ -42,9 +42,7 @@
 #define Iout_LTmin_default         500     //电流最小阈值,未用
 
 
-#define NO_USE_IM1253E							1
-#define Eight_light									1
-#define ADC_VOL 8
+
 #define ADC_V_CHN										2
 
 

+ 38 - 0
control/PDU-DC/App/Main/board_cnf.h

@@ -0,0 +1,38 @@
+#ifndef __BOARD_CNF_H_
+
+#define __BOARD_CNF_H_
+
+
+
+
+
+#define 								PRJ_BASE_DC_8      												0
+#define 								PRJ_ADC_V_DC_8														0
+#define                 PRJ_ADC_V_DC_7_1                          0
+#define                 PRJ_ADC_V_DC_4_4                          1
+
+#if   PRJ_BASE_DC_8
+	#define RELAY_ChN_default             		8
+	#define SUPPORT_IM1253E										1
+	
+#elif 		PRJ_ADC_V_DC_8
+	#define RELAY_ChN_default             		8
+	#define SUPPORT_ADC_GATHER_V							1
+	#define SUPPORT_ALL_ON_ALL_OFF          	1
+	#define SUPPORT_2_V_GA_CHN                1
+#elif 		PRJ_ADC_V_DC_7_1
+	#define RELAY_ChN_default             		7
+	#define SUPPORT_ADC_GATHER_V							1
+	#define SUPPORT_ALL_ON_ALL_OFF          	1
+	#define SUPPORT_EIGHT_LIGHT               1
+	#define SUPPORT_2_V_GA_CHN                1
+
+#elif			PRJ_ADC_V_DC_4_4
+	#define RELAY_ChN_default             		8
+	#define SURPPOT_ALL_ON_ALL_OFF          	1
+	#define SUPPORT_DETECTION               	1
+	#define SUPPORT_STM32_ADC                 1
+#endif
+
+
+#endif

+ 38 - 0
control/PDU-DC/App/detection/detection.c

@@ -0,0 +1,38 @@
+#include "detection.h"
+#include "gd32e230x_conf.h"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+void detection_Init()
+{
+	rcu_periph_clock_enable(RCU_GPIOB);  
+  rcu_periph_clock_enable(RCU_GPIOA);  
+  gpio_mode_set(GPIOB, GPIO_MODE_INPUT, GPIO_PUPD_PULLUP,GPIO_PIN_3); 
+	gpio_mode_set(GPIOA, GPIO_MODE_INPUT, GPIO_PUPD_PULLUP,GPIO_PIN_11); 
+	
+}
+
+
+uint8_t get_detection()
+{
+	uint8_t value = 0;
+	if(gpio_input_bit_get(RCU_GPIOB,GPIO_PIN_3)==0)
+		value |= 1;
+	if(gpio_input_bit_get(RCU_GPIOA,GPIO_PIN_11)==0)
+		value |= 2;
+	return value;
+}

+ 26 - 0
control/PDU-DC/App/detection/detection.h

@@ -0,0 +1,26 @@
+#ifndef __DETECTION_H_
+#define __DETECTION_H_
+
+#include "board_cnf.h"
+#include "stdint.h"
+
+
+
+
+
+
+
+
+
+
+
+
+void detection_Init();
+
+uint8_t get_detection();
+
+
+
+#endif
+
+

+ 41 - 0
control/PDU-DC/App/uart_IM1253E/IM1253E.c

@@ -20,6 +20,15 @@
 #include "SysTick.h"
 #include "IM1253E.h"
 #include "Uart1.h"
+#include "board_cnf.h"
+#include "Main.h"
+
+#if SUPPORT_STM32_ADC
+#include "ch442e.h"
+
+#endif
+
+
 /*********************************************************************************************************
 *                                              ºê¶¨Òå
 *********************************************************************************************************/
@@ -143,4 +152,36 @@ void Write_IM1253E_REG(uint8_t dev_addr,uint16_t reg_addr,uint8_t *pt,uint8_t le
 }
 
 
+#if SUPPORT_STM32_ADC
+
+
+Rx_Data data={0};
+
+float read_voltage(uint8_t channel)
+{
+	uint16_t read_volatge = 0xA5A5;
+	RX_Length = 4;
+	che442_change_ch(channel);
+	Start_Send_UartData((uint8_t*)&read_volatge,sizeof(read_volatge));
+	uint8_t count = 0;
+	while(Rx_Finish_flag != true)
+	{
+		DelayNms(1);
+		if(count >= 50)
+		{
+			RX_Index = 0;
+			Rx_Finish_flag =false;
+			break;
+		}
+	}
+	if(Rx_Finish_flag)
+	{
+		return data.value;
+	}
+	return 0.0;
+}
+
+
+
 
+#endif

+ 8 - 0
control/PDU-DC/App/uart_IM1253E/IM1253E.h

@@ -15,6 +15,7 @@
 *********************************************************************************************************/
 #ifndef __IM1253E_H
 #define __IM1253E_H	 
+#include "board_cnf.h"
 
 /*********************************************************************************************************
 *                                              °üº¬Í·Îļþ
@@ -58,4 +59,11 @@ uint16_t CRC_calculate_function(uint8_t len);
 void Read_IM1253E_REG(uint8_t dev_addr,uint16_t reg_addr,uint8_t len);
 void Write_IM1253E_REG(uint8_t dev_addr,uint16_t reg_addr,uint8_t *pt,uint8_t len);
 
+
+
+#if SUPPORT_STM32_ADC
+float read_voltage(uint8_t channel);
+#endif
+
+
 #endif

+ 8 - 0
control/PDU-DC/App/uart_IM1253E/Uart1.c

@@ -19,6 +19,8 @@
 *********************************************************************************************************/
 #include "Uart1.h"
 #include "IM1253E.h"
+#include "board_cnf.h"
+#include "Main.h"
 /*********************************************************************************************************
 *                                              宏定义
 *********************************************************************************************************/
@@ -63,7 +65,13 @@ void USART1_IRQHandler(void)
 	if(usart_interrupt_flag_get(USART1, USART_INT_FLAG_RBNE) != RESET)  //接收缓冲区非空中断
 	{
 		usart_interrupt_flag_clear(USART1, USART_INT_FLAG_RBNE);  //清除USART1中断挂起
+		
+#if SUPPORT_STM32_ADC
+		extern Rx_Data data;
+		data.data[RX_Index] = usart_data_receive(USART1);
+#else
 		Rx_Data_buff_IM1253E[RX_Index] = usart_data_receive(USART1);
+#endif
 		RX_Index++;
 		if(RX_Index >= RX_Length)//接收完成
 		{

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 140 - 59
control/PDU-DC/Project/GD32KeilPrj.uvguix.Gowon


+ 54 - 34
control/PDU-DC/Project/GD32KeilPrj.uvoptx

@@ -117,10 +117,6 @@
         <pMon>Segger\JL2CM3.dll</pMon>
       </DebugOpt>
       <TargetDriverDllRegistry>
-        <SetRegEntry>
-          <Number>0</Number>
-          <Key>DLGUARM</Key>
-        </SetRegEntry>
         <SetRegEntry>
           <Number>0</Number>
           <Key>DLGTARM</Key>
@@ -428,6 +424,30 @@
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
+    <File>
+      <GroupNumber>2</GroupNumber>
+      <FileNumber>17</FileNumber>
+      <FileType>1</FileType>
+      <tvExp>0</tvExp>
+      <tvExpOptDlg>0</tvExpOptDlg>
+      <bDave2>0</bDave2>
+      <PathWithFileName>..\App\CH442E\ch442e.c</PathWithFileName>
+      <FilenameWithoutPath>ch442e.c</FilenameWithoutPath>
+      <RteFlg>0</RteFlg>
+      <bShared>0</bShared>
+    </File>
+    <File>
+      <GroupNumber>2</GroupNumber>
+      <FileNumber>18</FileNumber>
+      <FileType>1</FileType>
+      <tvExp>0</tvExp>
+      <tvExpOptDlg>0</tvExpOptDlg>
+      <bDave2>0</bDave2>
+      <PathWithFileName>..\App\detection\detection.c</PathWithFileName>
+      <FilenameWithoutPath>detection.c</FilenameWithoutPath>
+      <RteFlg>0</RteFlg>
+      <bShared>0</bShared>
+    </File>
   </Group>
 
   <Group>
@@ -438,7 +458,7 @@
     <RteFlg>0</RteFlg>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>17</FileNumber>
+      <FileNumber>19</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -450,7 +470,7 @@
     </File>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>18</FileNumber>
+      <FileNumber>20</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -462,7 +482,7 @@
     </File>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>19</FileNumber>
+      <FileNumber>21</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -474,7 +494,7 @@
     </File>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>20</FileNumber>
+      <FileNumber>22</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -486,7 +506,7 @@
     </File>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>21</FileNumber>
+      <FileNumber>23</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -498,7 +518,7 @@
     </File>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>22</FileNumber>
+      <FileNumber>24</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -510,7 +530,7 @@
     </File>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>23</FileNumber>
+      <FileNumber>25</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -522,7 +542,7 @@
     </File>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>24</FileNumber>
+      <FileNumber>26</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -534,7 +554,7 @@
     </File>
     <File>
       <GroupNumber>3</GroupNumber>
-      <FileNumber>25</FileNumber>
+      <FileNumber>27</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -554,7 +574,7 @@
     <RteFlg>0</RteFlg>
     <File>
       <GroupNumber>4</GroupNumber>
-      <FileNumber>26</FileNumber>
+      <FileNumber>28</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -566,7 +586,7 @@
     </File>
     <File>
       <GroupNumber>4</GroupNumber>
-      <FileNumber>27</FileNumber>
+      <FileNumber>29</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -578,7 +598,7 @@
     </File>
     <File>
       <GroupNumber>4</GroupNumber>
-      <FileNumber>28</FileNumber>
+      <FileNumber>30</FileNumber>
       <FileType>2</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -590,7 +610,7 @@
     </File>
     <File>
       <GroupNumber>4</GroupNumber>
-      <FileNumber>29</FileNumber>
+      <FileNumber>31</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -602,7 +622,7 @@
     </File>
     <File>
       <GroupNumber>4</GroupNumber>
-      <FileNumber>30</FileNumber>
+      <FileNumber>32</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -622,7 +642,7 @@
     <RteFlg>0</RteFlg>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>31</FileNumber>
+      <FileNumber>33</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -634,7 +654,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>32</FileNumber>
+      <FileNumber>34</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -646,7 +666,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>33</FileNumber>
+      <FileNumber>35</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -658,7 +678,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>34</FileNumber>
+      <FileNumber>36</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -670,7 +690,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>35</FileNumber>
+      <FileNumber>37</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -682,7 +702,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>36</FileNumber>
+      <FileNumber>38</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -694,7 +714,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>37</FileNumber>
+      <FileNumber>39</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -706,7 +726,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>38</FileNumber>
+      <FileNumber>40</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -718,7 +738,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>39</FileNumber>
+      <FileNumber>41</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -730,7 +750,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>40</FileNumber>
+      <FileNumber>42</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -742,7 +762,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>41</FileNumber>
+      <FileNumber>43</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -754,7 +774,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>42</FileNumber>
+      <FileNumber>44</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -766,7 +786,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>43</FileNumber>
+      <FileNumber>45</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -778,7 +798,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>44</FileNumber>
+      <FileNumber>46</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -790,7 +810,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>45</FileNumber>
+      <FileNumber>47</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -802,7 +822,7 @@
     </File>
     <File>
       <GroupNumber>5</GroupNumber>
-      <FileNumber>46</FileNumber>
+      <FileNumber>48</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>

+ 11 - 1
control/PDU-DC/Project/GD32KeilPrj.uvprojx

@@ -339,7 +339,7 @@
               <MiscControls>-Wno-invalid-source-encoding</MiscControls>
               <Define>GD32E230</Define>
               <Undefine></Undefine>
-              <IncludePath>..\FW\Include;..\App\Main;..\App\DataType;..\ARM\SysTick;..\ARM\System;..\ARM\NVIC;..\HW\Timer;..\App\Modbus\ascii;..\App\Modbus\include;..\App\Modbus\rtu;..\App\Modbus\tcp;..\App\Led;..\HW\Rcu;..\App\Key;..\App\Relay;..\App\uart_IM1253E;..\App\Wwdgt;..\App\24cxx;..\HW\I2c;..\App\ReadEeprom;..\App\Modbus\BARE\port;..\App\Sn74hc573;..\App\Sn74hc595;..\App\ADC;..\App\FWDGT</IncludePath>
+              <IncludePath>..\FW\Include;..\App\Main;..\App\DataType;..\ARM\SysTick;..\ARM\System;..\ARM\NVIC;..\HW\Timer;..\App\Modbus\ascii;..\App\Modbus\include;..\App\Modbus\rtu;..\App\Modbus\tcp;..\App\Led;..\HW\Rcu;..\App\Key;..\App\Relay;..\App\uart_IM1253E;..\App\Wwdgt;..\App\24cxx;..\HW\I2c;..\App\ReadEeprom;..\App\Modbus\BARE\port;..\App\Sn74hc573;..\App\Sn74hc595;..\App\ADC;..\App\FWDGT;..\App\CH442E;..\App\detection</IncludePath>
             </VariousControls>
           </Cads>
           <Aads>
@@ -468,6 +468,16 @@
               <FileType>1</FileType>
               <FilePath>..\App\FWDGT\Fwdgt.c</FilePath>
             </File>
+            <File>
+              <FileName>ch442e.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\App\CH442E\ch442e.c</FilePath>
+            </File>
+            <File>
+              <FileName>detection.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\App\detection\detection.c</FilePath>
+            </File>
           </Files>
         </Group>
         <Group>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 4060 - 0
control/PDU-DC/Project/Listings/GD32KeilPrj_12_7.map


+ 942 - 0
control/PDU-DC/Project/Listings/startup_gd32e230.lst

@@ -0,0 +1,942 @@
+
+
+
+ARM Macro Assembler    Page 1 
+
+
+    1 00000000         ;/*!
+    2 00000000         ;    \file    startup_gd32e230.s
+    3 00000000         ;    \brief   start up file
+    4 00000000         ;
+    5 00000000         ;    \version 2018-6-19, V1.0.0, firmware for GD32E230
+    6 00000000         ;*/
+    7 00000000         ;
+    8 00000000         ;/*
+    9 00000000         ;    Copyright (c) 2018, GigaDevice Semiconductor Inc.
+   10 00000000         ;
+   11 00000000         ;    All rights reserved.
+   12 00000000         ;
+   13 00000000         ;    Redistribution and use in source and binary forms, 
+                       with or without modification, 
+   14 00000000         ;are permitted provided that the following conditions ar
+                       e met:
+   15 00000000         ;
+   16 00000000         ;    1. Redistributions of source code must retain the a
+                       bove copyright notice, this 
+   17 00000000         ;       list of conditions and the following disclaimer.
+                       
+   18 00000000         ;    2. Redistributions in binary form must reproduce th
+                       e above copyright notice, 
+   19 00000000         ;       this list of conditions and the following discla
+                       imer in the documentation 
+   20 00000000         ;       and/or other materials provided with the distrib
+                       ution.
+   21 00000000         ;    3. Neither the name of the copyright holder nor the
+                        names of its contributors 
+   22 00000000         ;       may be used to endorse or promote products deriv
+                       ed from this software without 
+   23 00000000         ;       specific prior written permission.
+   24 00000000         ;
+   25 00000000         ;    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 
+                       AND CONTRIBUTORS "AS IS" 
+   26 00000000         ;AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT N
+                       OT LIMITED TO, THE IMPLIED 
+   27 00000000         ;WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICU
+                       LAR PURPOSE ARE DISCLAIMED. 
+   28 00000000         ;IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 
+                       BE LIABLE FOR ANY DIRECT, 
+   29 00000000         ;INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENT
+                       IAL DAMAGES (INCLUDING, BUT 
+   30 00000000         ;NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERV
+                       ICES; LOSS OF USE, DATA, OR 
+   31 00000000         ;PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND O
+                       N ANY THEORY OF LIABILITY, 
+   32 00000000         ;WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDI
+                       NG NEGLIGENCE OR OTHERWISE) 
+   33 00000000         ;ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVE
+                       N IF ADVISED OF THE POSSIBILITY 
+   34 00000000         ;OF SUCH DAMAGE.
+   35 00000000         ;*/
+   36 00000000         
+   37 00000000         ; <h> Stack Configuration
+   38 00000000         ;   <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
+   39 00000000         ; </h>
+   40 00000000         
+   41 00000000 00000400 
+
+
+
+ARM Macro Assembler    Page 2 
+
+
+                       Stack_Size
+                               EQU              0x00000400
+   42 00000000         
+   43 00000000                 AREA             STACK, NOINIT, READWRITE, ALIGN
+=3
+   44 00000000         Stack_Mem
+                               SPACE            Stack_Size
+   45 00000400         __initial_sp
+   46 00000400         
+   47 00000400         
+   48 00000400         ; <h> Heap Configuration
+   49 00000400         ;   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
+   50 00000400         ; </h>
+   51 00000400         
+   52 00000400 00000400 
+                       Heap_Size
+                               EQU              0x00000400
+   53 00000400         
+   54 00000400                 AREA             HEAP, NOINIT, READWRITE, ALIGN=
+3
+   55 00000000         __heap_base
+   56 00000000         Heap_Mem
+                               SPACE            Heap_Size
+   57 00000400         __heap_limit
+   58 00000400         
+   59 00000400                 PRESERVE8
+   60 00000400                 THUMB
+   61 00000400         
+   62 00000400         ;               /* reset Vector Mapped to at Address 0 *
+                       /
+   63 00000400                 AREA             RESET, DATA, READONLY
+   64 00000000                 EXPORT           __Vectors
+   65 00000000                 EXPORT           __Vectors_End
+   66 00000000                 EXPORT           __Vectors_Size
+   67 00000000         
+   68 00000000 00000000 
+                       __Vectors
+                               DCD              __initial_sp ; Top of Stack
+   69 00000004 00000000        DCD              Reset_Handler ; Reset Handler
+   70 00000008 00000000        DCD              NMI_Handler ; NMI Handler
+   71 0000000C 00000000        DCD              HardFault_Handler ; Hard Fault 
+                                                            Handler
+   72 00000010 00000000        DCD              0           ; Reserved
+   73 00000014 00000000        DCD              0           ; Reserved
+   74 00000018 00000000        DCD              0           ; Reserved
+   75 0000001C 00000000        DCD              0           ; Reserved
+   76 00000020 00000000        DCD              0           ; Reserved
+   77 00000024 00000000        DCD              0           ; Reserved
+   78 00000028 00000000        DCD              0           ; Reserved
+   79 0000002C 00000000        DCD              SVC_Handler ; SVCall Handler
+   80 00000030 00000000        DCD              0           ; Reserved
+   81 00000034 00000000        DCD              0           ; Reserved
+   82 00000038 00000000        DCD              PendSV_Handler ; PendSV Handler
+                                                            
+   83 0000003C 00000000        DCD              SysTick_Handler 
+                                                            ; SysTick Handler
+   84 00000040         
+   85 00000040         ;               /* external interrupts handler */
+   86 00000040 00000000        DCD              WWDGT_IRQHandler ; 16:Window Wa
+
+
+
+ARM Macro Assembler    Page 3 
+
+
+                                                            tchdog Timer
+   87 00000044 00000000        DCD              LVD_IRQHandler ; 17:LVD through
+                                                             EXTI Line detect
+   88 00000048 00000000        DCD              RTC_IRQHandler ; 18:RTC through
+                                                             EXTI Line
+   89 0000004C 00000000        DCD              FMC_IRQHandler ; 19:FMC
+   90 00000050 00000000        DCD              RCU_IRQHandler ; 20:RCU
+   91 00000054 00000000        DCD              EXTI0_1_IRQHandler ; 21:EXTI Li
+                                                            ne 0 and EXTI Line 
+                                                            1
+   92 00000058 00000000        DCD              EXTI2_3_IRQHandler ; 22:EXTI Li
+                                                            ne 2 and EXTI Line 
+                                                            3
+   93 0000005C 00000000        DCD              EXTI4_15_IRQHandler ; 23:EXTI L
+                                                            ine 4 to EXTI Line 
+                                                            15
+   94 00000060 00000000        DCD              0           ; Reserved
+   95 00000064 00000000        DCD              DMA_Channel0_IRQHandler 
+                                                            ; 25:DMA Channel 0 
+                                                            
+   96 00000068 00000000        DCD              DMA_Channel1_2_IRQHandler ; 26:
+                                                            DMA Channel 1 and D
+                                                            MA Channel 2
+   97 0000006C 00000000        DCD              DMA_Channel3_4_IRQHandler ; 27:
+                                                            DMA Channel 3 and D
+                                                            MA Channel 4
+   98 00000070 00000000        DCD              ADC_CMP_IRQHandler ; 28:ADC and
+                                                             Comparator
+   99 00000074 00000000        DCD              TIMER0_BRK_UP_TRG_COM_IRQHandle
+r 
+                                                            ; 29:TIMER0 Break,U
+                                                            pdate,Trigger and C
+                                                            ommutation
+  100 00000078 00000000        DCD              TIMER0_Channel_IRQHandler ; 30:
+                                                            TIMER0 Channel Capt
+                                                            ure Compare
+  101 0000007C 00000000        DCD              0           ; Reserved
+  102 00000080 00000000        DCD              TIMER2_IRQHandler ; 32:TIMER2
+  103 00000084 00000000        DCD              TIMER5_IRQHandler ; 33:TIMER5
+  104 00000088 00000000        DCD              0           ; Reserved
+  105 0000008C 00000000        DCD              TIMER13_IRQHandler ; 35:TIMER13
+                                                            
+  106 00000090 00000000        DCD              TIMER14_IRQHandler ; 36:TIMER14
+                                                            
+  107 00000094 00000000        DCD              TIMER15_IRQHandler ; 37:TIMER15
+                                                            
+  108 00000098 00000000        DCD              TIMER16_IRQHandler ; 38:TIMER16
+                                                            
+  109 0000009C 00000000        DCD              I2C0_EV_IRQHandler 
+                                                            ; 39:I2C0 Event
+  110 000000A0 00000000        DCD              I2C1_EV_IRQHandler 
+                                                            ; 40:I2C1 Event
+  111 000000A4 00000000        DCD              SPI0_IRQHandler ; 41:SPI0
+  112 000000A8 00000000        DCD              SPI1_IRQHandler ; 42:SPI1
+  113 000000AC 00000000        DCD              USART0_IRQHandler ; 43:USART0
+  114 000000B0 00000000        DCD              USART1_IRQHandler ; 44:USART1
+  115 000000B4 00000000        DCD              0           ; Reserved
+  116 000000B8 00000000        DCD              0           ; Reserved
+  117 000000BC 00000000        DCD              0           ; Reserved
+
+
+
+ARM Macro Assembler    Page 4 
+
+
+  118 000000C0 00000000        DCD              I2C0_ER_IRQHandler 
+                                                            ; 48:I2C0 Error
+  119 000000C4 00000000        DCD              0           ; Reserved
+  120 000000C8 00000000        DCD              I2C1_ER_IRQHandler 
+                                                            ; 50:I2C1 Error
+  121 000000CC         __Vectors_End
+  122 000000CC         
+  123 000000CC 000000CC 
+                       __Vectors_Size
+                               EQU              __Vectors_End - __Vectors
+  124 000000CC         
+  125 000000CC                 AREA             |.text|, CODE, READONLY
+  126 00000000         
+  127 00000000         ;/* reset Handler */
+  128 00000000         Reset_Handler
+                               PROC
+  129 00000000                 EXPORT           Reset_Handler                  
+   [WEAK]
+  130 00000000                 IMPORT           SystemInit
+  131 00000000                 IMPORT           __main
+  132 00000000 4807            LDR              R0, =SystemInit
+  133 00000002 4780            BLX              R0
+  134 00000004 4807            LDR              R0, =__main
+  135 00000006 4700            BX               R0
+  136 00000008                 ENDP
+  137 00000008         
+  138 00000008         ;/* dummy Exception Handlers */
+  140 00000008         NMI_Handler
+                               PROC
+  141 00000008                 EXPORT           NMI_Handler                    
+   [WEAK]
+  142 00000008 E7FE            B                .
+  143 0000000A                 ENDP
+  145 0000000A         HardFault_Handler
+                               PROC
+  146 0000000A                 EXPORT           HardFault_Handler              
+   [WEAK]
+  147 0000000A E7FE            B                .
+  148 0000000C                 ENDP
+  150 0000000C         SVC_Handler
+                               PROC
+  151 0000000C                 EXPORT           SVC_Handler                    
+   [WEAK]
+  152 0000000C E7FE            B                .
+  153 0000000E                 ENDP
+  155 0000000E         PendSV_Handler
+                               PROC
+  156 0000000E                 EXPORT           PendSV_Handler                 
+   [WEAK]
+  157 0000000E E7FE            B                .
+  158 00000010                 ENDP
+  160 00000010         SysTick_Handler
+                               PROC
+  161 00000010                 EXPORT           SysTick_Handler                
+   [WEAK]
+  162 00000010 E7FE            B                .
+  163 00000012                 ENDP
+  164 00000012         
+  165 00000012         Default_Handler
+
+
+
+ARM Macro Assembler    Page 5 
+
+
+                               PROC
+  166 00000012         ;               /* external interrupts handler */
+  167 00000012                 EXPORT           WWDGT_IRQHandler               
+   [WEAK]
+  168 00000012                 EXPORT           LVD_IRQHandler                 
+   [WEAK]
+  169 00000012                 EXPORT           RTC_IRQHandler                 
+   [WEAK]
+  170 00000012                 EXPORT           FMC_IRQHandler                 
+   [WEAK]
+  171 00000012                 EXPORT           RCU_IRQHandler                 
+   [WEAK]
+  172 00000012                 EXPORT           EXTI0_1_IRQHandler             
+   [WEAK]
+  173 00000012                 EXPORT           EXTI2_3_IRQHandler             
+   [WEAK]
+  174 00000012                 EXPORT           EXTI4_15_IRQHandler            
+   [WEAK]
+  175 00000012                 EXPORT           DMA_Channel0_IRQHandler        
+   [WEAK]
+  176 00000012                 EXPORT           DMA_Channel1_2_IRQHandler      
+   [WEAK]
+  177 00000012                 EXPORT           DMA_Channel3_4_IRQHandler      
+   [WEAK]
+  178 00000012                 EXPORT           ADC_CMP_IRQHandler             
+   [WEAK]
+  179 00000012                 EXPORT           TIMER0_BRK_UP_TRG_COM_IRQHandle
+r  [WEAK]
+  180 00000012                 EXPORT           TIMER0_Channel_IRQHandler      
+   [WEAK]
+  181 00000012                 EXPORT           TIMER2_IRQHandler              
+   [WEAK]
+  182 00000012                 EXPORT           TIMER5_IRQHandler              
+   [WEAK]
+  183 00000012                 EXPORT           TIMER13_IRQHandler             
+   [WEAK]
+  184 00000012                 EXPORT           TIMER14_IRQHandler             
+   [WEAK]
+  185 00000012                 EXPORT           TIMER15_IRQHandler             
+   [WEAK]
+  186 00000012                 EXPORT           TIMER16_IRQHandler             
+   [WEAK]
+  187 00000012                 EXPORT           I2C0_EV_IRQHandler             
+   [WEAK]
+  188 00000012                 EXPORT           I2C1_EV_IRQHandler             
+   [WEAK]
+  189 00000012                 EXPORT           SPI0_IRQHandler                
+   [WEAK]
+  190 00000012                 EXPORT           SPI1_IRQHandler                
+   [WEAK]
+  191 00000012                 EXPORT           USART0_IRQHandler              
+   [WEAK]
+  192 00000012                 EXPORT           USART1_IRQHandler              
+   [WEAK]
+  193 00000012                 EXPORT           I2C0_ER_IRQHandler             
+   [WEAK]
+  194 00000012                 EXPORT           I2C1_ER_IRQHandler             
+   [WEAK]
+  195 00000012         
+
+
+
+ARM Macro Assembler    Page 6 
+
+
+  196 00000012         ;/* external interrupts handler */
+  197 00000012         WWDGT_IRQHandler
+  198 00000012         LVD_IRQHandler
+  199 00000012         RTC_IRQHandler
+  200 00000012         FMC_IRQHandler
+  201 00000012         RCU_IRQHandler
+  202 00000012         EXTI0_1_IRQHandler
+  203 00000012         EXTI2_3_IRQHandler
+  204 00000012         EXTI4_15_IRQHandler
+  205 00000012         DMA_Channel0_IRQHandler
+  206 00000012         DMA_Channel1_2_IRQHandler
+  207 00000012         DMA_Channel3_4_IRQHandler
+  208 00000012         ADC_CMP_IRQHandler
+  209 00000012         TIMER0_BRK_UP_TRG_COM_IRQHandler
+  210 00000012         TIMER0_Channel_IRQHandler
+  211 00000012         TIMER2_IRQHandler
+  212 00000012         TIMER5_IRQHandler
+  213 00000012         TIMER13_IRQHandler
+  214 00000012         TIMER14_IRQHandler
+  215 00000012         TIMER15_IRQHandler
+  216 00000012         TIMER16_IRQHandler
+  217 00000012         I2C0_EV_IRQHandler
+  218 00000012         I2C1_EV_IRQHandler
+  219 00000012         SPI0_IRQHandler
+  220 00000012         SPI1_IRQHandler
+  221 00000012         USART0_IRQHandler
+  222 00000012         USART1_IRQHandler
+  223 00000012         I2C0_ER_IRQHandler
+  224 00000012         I2C1_ER_IRQHandler
+  225 00000012         
+  226 00000012 E7FE            B                .
+  227 00000014                 ENDP
+  228 00000014         
+  229 00000014                 ALIGN
+  230 00000014         
+  231 00000014         ; user Initial Stack & Heap
+  232 00000014         
+  233 00000014                 IF               :DEF:__MICROLIB
+  240 00000014         
+  241 00000014                 IMPORT           __use_two_region_memory
+  242 00000014                 EXPORT           __user_initial_stackheap
+  243 00000014         
+  244 00000014         __user_initial_stackheap
+                               PROC
+  245 00000014 4804            LDR              R0, =  Heap_Mem
+  246 00000016 4905            LDR              R1, =(Stack_Mem + Stack_Size)
+  247 00000018 4A05            LDR              R2, = (Heap_Mem +  Heap_Size)
+  248 0000001A 4B06            LDR              R3, = Stack_Mem
+  249 0000001C 4770            BX               LR
+  250 0000001E                 ENDP
+  251 0000001E         
+  252 0000001E 00 00           ALIGN
+  253 00000020         
+  254 00000020                 ENDIF
+  255 00000020         
+  256 00000020                 END
+              00000000 
+              00000000 
+              00000000 
+
+
+
+ARM Macro Assembler    Page 7 
+
+
+              00000400 
+              00000400 
+              00000000 
+Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M23 --depend=.\o
+bjects\startup_gd32e230.d -o.\objects\startup_gd32e230.o -I.\RTE\_Target_1 -ID:
+\Keil_v5\pack\ARM\CMSIS\5.8.0\CMSIS\Core\Include -ID:\Keil_v5\pack\GigaDevice\G
+D32E23x_DFP\2.2.1\Device\Include --predefine="__UVISION_VERSION SETA 536" --pre
+define="_RTE_ SETA 1" --predefine="GD32E23x SETA 1" --predefine="_RTE_ SETA 1" 
+--list=.\listings\startup_gd32e230.lst ..\ARM\System\startup_gd32e230.s
+
+
+
+ARM Macro Assembler    Page 1 Alphabetic symbol ordering
+Relocatable symbols
+
+STACK 00000000
+
+Symbol: STACK
+   Definitions
+      At line 43 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      None
+Comment: STACK unused
+Stack_Mem 00000000
+
+Symbol: Stack_Mem
+   Definitions
+      At line 44 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 246 in file ..\ARM\System\startup_gd32e230.s
+      At line 248 in file ..\ARM\System\startup_gd32e230.s
+
+__initial_sp 00000400
+
+Symbol: __initial_sp
+   Definitions
+      At line 45 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 68 in file ..\ARM\System\startup_gd32e230.s
+Comment: __initial_sp used once
+3 symbols
+
+
+
+ARM Macro Assembler    Page 1 Alphabetic symbol ordering
+Relocatable symbols
+
+HEAP 00000000
+
+Symbol: HEAP
+   Definitions
+      At line 54 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      None
+Comment: HEAP unused
+Heap_Mem 00000000
+
+Symbol: Heap_Mem
+   Definitions
+      At line 56 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 245 in file ..\ARM\System\startup_gd32e230.s
+      At line 247 in file ..\ARM\System\startup_gd32e230.s
+
+__heap_base 00000000
+
+Symbol: __heap_base
+   Definitions
+      At line 55 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      None
+Comment: __heap_base unused
+__heap_limit 00000400
+
+Symbol: __heap_limit
+   Definitions
+      At line 57 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      None
+Comment: __heap_limit unused
+4 symbols
+
+
+
+ARM Macro Assembler    Page 1 Alphabetic symbol ordering
+Relocatable symbols
+
+RESET 00000000
+
+Symbol: RESET
+   Definitions
+      At line 63 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      None
+Comment: RESET unused
+__Vectors 00000000
+
+Symbol: __Vectors
+   Definitions
+      At line 68 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 64 in file ..\ARM\System\startup_gd32e230.s
+      At line 123 in file ..\ARM\System\startup_gd32e230.s
+
+__Vectors_End 000000CC
+
+Symbol: __Vectors_End
+   Definitions
+      At line 121 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 65 in file ..\ARM\System\startup_gd32e230.s
+      At line 123 in file ..\ARM\System\startup_gd32e230.s
+
+3 symbols
+
+
+
+ARM Macro Assembler    Page 1 Alphabetic symbol ordering
+Relocatable symbols
+
+.text 00000000
+
+Symbol: .text
+   Definitions
+      At line 125 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      None
+Comment: .text unused
+ADC_CMP_IRQHandler 00000012
+
+Symbol: ADC_CMP_IRQHandler
+   Definitions
+      At line 208 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 98 in file ..\ARM\System\startup_gd32e230.s
+      At line 178 in file ..\ARM\System\startup_gd32e230.s
+
+DMA_Channel0_IRQHandler 00000012
+
+Symbol: DMA_Channel0_IRQHandler
+   Definitions
+      At line 205 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 95 in file ..\ARM\System\startup_gd32e230.s
+      At line 175 in file ..\ARM\System\startup_gd32e230.s
+
+DMA_Channel1_2_IRQHandler 00000012
+
+Symbol: DMA_Channel1_2_IRQHandler
+   Definitions
+      At line 206 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 96 in file ..\ARM\System\startup_gd32e230.s
+      At line 176 in file ..\ARM\System\startup_gd32e230.s
+
+DMA_Channel3_4_IRQHandler 00000012
+
+Symbol: DMA_Channel3_4_IRQHandler
+   Definitions
+      At line 207 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 97 in file ..\ARM\System\startup_gd32e230.s
+      At line 177 in file ..\ARM\System\startup_gd32e230.s
+
+Default_Handler 00000012
+
+Symbol: Default_Handler
+   Definitions
+      At line 165 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      None
+Comment: Default_Handler unused
+EXTI0_1_IRQHandler 00000012
+
+Symbol: EXTI0_1_IRQHandler
+   Definitions
+      At line 202 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 91 in file ..\ARM\System\startup_gd32e230.s
+
+
+
+ARM Macro Assembler    Page 2 Alphabetic symbol ordering
+Relocatable symbols
+
+      At line 172 in file ..\ARM\System\startup_gd32e230.s
+
+EXTI2_3_IRQHandler 00000012
+
+Symbol: EXTI2_3_IRQHandler
+   Definitions
+      At line 203 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 92 in file ..\ARM\System\startup_gd32e230.s
+      At line 173 in file ..\ARM\System\startup_gd32e230.s
+
+EXTI4_15_IRQHandler 00000012
+
+Symbol: EXTI4_15_IRQHandler
+   Definitions
+      At line 204 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 93 in file ..\ARM\System\startup_gd32e230.s
+      At line 174 in file ..\ARM\System\startup_gd32e230.s
+
+FMC_IRQHandler 00000012
+
+Symbol: FMC_IRQHandler
+   Definitions
+      At line 200 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 89 in file ..\ARM\System\startup_gd32e230.s
+      At line 170 in file ..\ARM\System\startup_gd32e230.s
+
+HardFault_Handler 0000000A
+
+Symbol: HardFault_Handler
+   Definitions
+      At line 145 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 71 in file ..\ARM\System\startup_gd32e230.s
+      At line 146 in file ..\ARM\System\startup_gd32e230.s
+
+I2C0_ER_IRQHandler 00000012
+
+Symbol: I2C0_ER_IRQHandler
+   Definitions
+      At line 223 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 118 in file ..\ARM\System\startup_gd32e230.s
+      At line 193 in file ..\ARM\System\startup_gd32e230.s
+
+I2C0_EV_IRQHandler 00000012
+
+Symbol: I2C0_EV_IRQHandler
+   Definitions
+      At line 217 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 109 in file ..\ARM\System\startup_gd32e230.s
+      At line 187 in file ..\ARM\System\startup_gd32e230.s
+
+I2C1_ER_IRQHandler 00000012
+
+Symbol: I2C1_ER_IRQHandler
+
+
+
+ARM Macro Assembler    Page 3 Alphabetic symbol ordering
+Relocatable symbols
+
+   Definitions
+      At line 224 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 120 in file ..\ARM\System\startup_gd32e230.s
+      At line 194 in file ..\ARM\System\startup_gd32e230.s
+
+I2C1_EV_IRQHandler 00000012
+
+Symbol: I2C1_EV_IRQHandler
+   Definitions
+      At line 218 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 110 in file ..\ARM\System\startup_gd32e230.s
+      At line 188 in file ..\ARM\System\startup_gd32e230.s
+
+LVD_IRQHandler 00000012
+
+Symbol: LVD_IRQHandler
+   Definitions
+      At line 198 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 87 in file ..\ARM\System\startup_gd32e230.s
+      At line 168 in file ..\ARM\System\startup_gd32e230.s
+
+NMI_Handler 00000008
+
+Symbol: NMI_Handler
+   Definitions
+      At line 140 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 70 in file ..\ARM\System\startup_gd32e230.s
+      At line 141 in file ..\ARM\System\startup_gd32e230.s
+
+PendSV_Handler 0000000E
+
+Symbol: PendSV_Handler
+   Definitions
+      At line 155 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 82 in file ..\ARM\System\startup_gd32e230.s
+      At line 156 in file ..\ARM\System\startup_gd32e230.s
+
+RCU_IRQHandler 00000012
+
+Symbol: RCU_IRQHandler
+   Definitions
+      At line 201 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 90 in file ..\ARM\System\startup_gd32e230.s
+      At line 171 in file ..\ARM\System\startup_gd32e230.s
+
+RTC_IRQHandler 00000012
+
+Symbol: RTC_IRQHandler
+   Definitions
+      At line 199 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 88 in file ..\ARM\System\startup_gd32e230.s
+      At line 169 in file ..\ARM\System\startup_gd32e230.s
+
+
+
+ARM Macro Assembler    Page 4 Alphabetic symbol ordering
+Relocatable symbols
+
+
+Reset_Handler 00000000
+
+Symbol: Reset_Handler
+   Definitions
+      At line 128 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 69 in file ..\ARM\System\startup_gd32e230.s
+      At line 129 in file ..\ARM\System\startup_gd32e230.s
+
+SPI0_IRQHandler 00000012
+
+Symbol: SPI0_IRQHandler
+   Definitions
+      At line 219 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 111 in file ..\ARM\System\startup_gd32e230.s
+      At line 189 in file ..\ARM\System\startup_gd32e230.s
+
+SPI1_IRQHandler 00000012
+
+Symbol: SPI1_IRQHandler
+   Definitions
+      At line 220 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 112 in file ..\ARM\System\startup_gd32e230.s
+      At line 190 in file ..\ARM\System\startup_gd32e230.s
+
+SVC_Handler 0000000C
+
+Symbol: SVC_Handler
+   Definitions
+      At line 150 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 79 in file ..\ARM\System\startup_gd32e230.s
+      At line 151 in file ..\ARM\System\startup_gd32e230.s
+
+SysTick_Handler 00000010
+
+Symbol: SysTick_Handler
+   Definitions
+      At line 160 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 83 in file ..\ARM\System\startup_gd32e230.s
+      At line 161 in file ..\ARM\System\startup_gd32e230.s
+
+TIMER0_BRK_UP_TRG_COM_IRQHandler 00000012
+
+Symbol: TIMER0_BRK_UP_TRG_COM_IRQHandler
+   Definitions
+      At line 209 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 99 in file ..\ARM\System\startup_gd32e230.s
+      At line 179 in file ..\ARM\System\startup_gd32e230.s
+
+TIMER0_Channel_IRQHandler 00000012
+
+Symbol: TIMER0_Channel_IRQHandler
+   Definitions
+
+
+
+ARM Macro Assembler    Page 5 Alphabetic symbol ordering
+Relocatable symbols
+
+      At line 210 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 100 in file ..\ARM\System\startup_gd32e230.s
+      At line 180 in file ..\ARM\System\startup_gd32e230.s
+
+TIMER13_IRQHandler 00000012
+
+Symbol: TIMER13_IRQHandler
+   Definitions
+      At line 213 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 105 in file ..\ARM\System\startup_gd32e230.s
+      At line 183 in file ..\ARM\System\startup_gd32e230.s
+
+TIMER14_IRQHandler 00000012
+
+Symbol: TIMER14_IRQHandler
+   Definitions
+      At line 214 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 106 in file ..\ARM\System\startup_gd32e230.s
+      At line 184 in file ..\ARM\System\startup_gd32e230.s
+
+TIMER15_IRQHandler 00000012
+
+Symbol: TIMER15_IRQHandler
+   Definitions
+      At line 215 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 107 in file ..\ARM\System\startup_gd32e230.s
+      At line 185 in file ..\ARM\System\startup_gd32e230.s
+
+TIMER16_IRQHandler 00000012
+
+Symbol: TIMER16_IRQHandler
+   Definitions
+      At line 216 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 108 in file ..\ARM\System\startup_gd32e230.s
+      At line 186 in file ..\ARM\System\startup_gd32e230.s
+
+TIMER2_IRQHandler 00000012
+
+Symbol: TIMER2_IRQHandler
+   Definitions
+      At line 211 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 102 in file ..\ARM\System\startup_gd32e230.s
+      At line 181 in file ..\ARM\System\startup_gd32e230.s
+
+TIMER5_IRQHandler 00000012
+
+Symbol: TIMER5_IRQHandler
+   Definitions
+      At line 212 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 103 in file ..\ARM\System\startup_gd32e230.s
+      At line 182 in file ..\ARM\System\startup_gd32e230.s
+
+
+
+
+ARM Macro Assembler    Page 6 Alphabetic symbol ordering
+Relocatable symbols
+
+USART0_IRQHandler 00000012
+
+Symbol: USART0_IRQHandler
+   Definitions
+      At line 221 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 113 in file ..\ARM\System\startup_gd32e230.s
+      At line 191 in file ..\ARM\System\startup_gd32e230.s
+
+USART1_IRQHandler 00000012
+
+Symbol: USART1_IRQHandler
+   Definitions
+      At line 222 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 114 in file ..\ARM\System\startup_gd32e230.s
+      At line 192 in file ..\ARM\System\startup_gd32e230.s
+
+WWDGT_IRQHandler 00000012
+
+Symbol: WWDGT_IRQHandler
+   Definitions
+      At line 197 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 86 in file ..\ARM\System\startup_gd32e230.s
+      At line 167 in file ..\ARM\System\startup_gd32e230.s
+
+__user_initial_stackheap 00000014
+
+Symbol: __user_initial_stackheap
+   Definitions
+      At line 244 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 242 in file ..\ARM\System\startup_gd32e230.s
+Comment: __user_initial_stackheap used once
+37 symbols
+
+
+
+ARM Macro Assembler    Page 1 Alphabetic symbol ordering
+Absolute symbols
+
+Heap_Size 00000400
+
+Symbol: Heap_Size
+   Definitions
+      At line 52 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 56 in file ..\ARM\System\startup_gd32e230.s
+      At line 247 in file ..\ARM\System\startup_gd32e230.s
+
+Stack_Size 00000400
+
+Symbol: Stack_Size
+   Definitions
+      At line 41 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 44 in file ..\ARM\System\startup_gd32e230.s
+      At line 246 in file ..\ARM\System\startup_gd32e230.s
+
+__Vectors_Size 000000CC
+
+Symbol: __Vectors_Size
+   Definitions
+      At line 123 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 66 in file ..\ARM\System\startup_gd32e230.s
+Comment: __Vectors_Size used once
+3 symbols
+
+
+
+ARM Macro Assembler    Page 1 Alphabetic symbol ordering
+External symbols
+
+SystemInit 00000000
+
+Symbol: SystemInit
+   Definitions
+      At line 130 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 132 in file ..\ARM\System\startup_gd32e230.s
+Comment: SystemInit used once
+__main 00000000
+
+Symbol: __main
+   Definitions
+      At line 131 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      At line 134 in file ..\ARM\System\startup_gd32e230.s
+Comment: __main used once
+__use_two_region_memory 00000000
+
+Symbol: __use_two_region_memory
+   Definitions
+      At line 241 in file ..\ARM\System\startup_gd32e230.s
+   Uses
+      None
+Comment: __use_two_region_memory unused
+3 symbols
+390 symbols in table