From 127bcc70c9d3e0871a0fd80ff8e21190c80a8229 Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期三, 22 九月 2021 17:59:03 +0800
Subject: [PATCH] V1.56 固定参数版本

---
 源码/核心板/Src/stm32f10x_it.c |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/stm32f10x_it.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/stm32f10x_it.c"
index 77ee444..58eb6ef 100644
--- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/stm32f10x_it.c"
+++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/stm32f10x_it.c"
@@ -37,7 +37,7 @@
 uint16_t sysscal;
 u16 tag_recv_timer, tag_timer,last_polltime;
 extern uint16_t g_Resttimer,heartbeat_timer,sync_timer;
-extern uint8_t g_pairstart;
+extern uint8_t g_pairstart,getrange_success;
 u8 neartimout_timer=0,flag_syncbase=0,flag_newsecond=0;
 extern u16 tyncpoll_time,target_time;
 extern uint32_t synclost_timer,current_syncid;
@@ -55,15 +55,19 @@
 	//GPIO_WriteBit(GPIOA, GPIO_Pin_10, Bit_RESET);			
 	if(sync_timer>=1000)
 		{
+//			if(getrange_success==0)
+//			{
+//				NVIC_SystemReset();
+//			}
 			flag_newsecond=1;
 		//GPIO_WriteBit(GPIOA, GPIO_Pin_10, Bit_SET);	
 			sync_timer=0;
 		  TagListUpdate();
 		}
 		
-	if(g_Resttimer++>2000)
+	if(g_Resttimer++>10000)
 	{
-//		NVIC_SystemReset();
+		NVIC_SystemReset();
 	}
 
 
@@ -82,7 +86,7 @@
 		}
 		
 		#ifdef USART_INTEGRATE_OUTPUT
-		if(sync_timer==target_time)
+		if(sync_timer%g_com_map[COM_INTERVAL]==0)
 		{
 			
 			usart_send_flag=1;		
@@ -94,7 +98,7 @@
 		}
 		if(synclost_timer>SYNCLOST_TIME)
 		{
-			//flag_syncbase=1;
+			flag_syncbase=1;
 		}
 
 		if(flag_syncbase)  //本模块是同步基站
@@ -109,6 +113,7 @@
 	}else{		//标签同步处理
 		if(sync_timer==target_time)
 		{
+
 			last_polltime=sync_timer;
 		//	GPIO_WriteBit(GPIOA, GPIO_Pin_9, Bit_SET);
 		g_start_send_flag=1;
@@ -155,4 +160,12 @@
 //  }    
 
 }
+void HardFalut_Handler(void)
+{
+	while(1)
+	{
+		NVIC_SystemReset();
+	}
+
+}
 

--
Gitblit v1.9.3