zhyinch
2021-09-05 c20b80fe9dfe72220649bf1d85550e9f3ebc9549
源码/核心板/Src/stm32f10x_it.c
@@ -46,29 +46,16 @@
   if (TIM_GetITStatus(TIM3, TIM_IT_Update) != RESET)  //??TIM3????????
      {
      TIM_ClearITPendingBit(TIM3, TIM_IT_Update  );  //??TIMx?????? 
   main_logic();
   //main_logic();
   time32_incr++;
   heartbeat_timer++;
   sync_timer++;   
   neartimout_timer++;
   synclost_timer++;
   GPIO_WriteBit(GPIOA, GPIO_Pin_8, Bit_RESET);
   //GPIO_WriteBit(GPIOA, GPIO_Pin_8, Bit_RESET);
   if(sync_timer>=1000)
      {uint8_t i;
         for(i=0;i<MAX_REGTAGNUM;i++)
         {
            if(regtag_map.remain_time[i]>0)
            {
               regtag_map.remain_time[i]--;
            }
         }
         if(pwtag.remain_time>0)
         {pwtag.remain_time--;}
         flag_newsecond=1;
      GPIO_WriteBit(GPIOA, GPIO_Pin_8, Bit_SET);
         sync_timer=0;
         synclost_count++;
        TagListUpdate();
      {
            sync_timer=0;
         if(g_com_map[BASESYNCSEQ]==1)  //鏈ā鍧楁槸鍚屾鍩虹珯
         {
            synclost_count = 0;
@@ -76,16 +63,12 @@
            sync_seq=0;
               SyncPoll(sync_seq);
         }
      }
   if(g_Resttimer++>12000)
   {
      NVIC_SystemReset();
   }
            if(g_Resttimer++>12)
            {
                NVIC_SystemReset();
            }
      }
   if(!g_com_map[DEV_ROLE])  //鍩虹珯
   {
      tag_recv_timer++;
@@ -96,8 +79,7 @@
         {
         g_start_send_flag=1;
         }
      }
      }
      #ifdef USART_INTEGRATE_OUTPUT
      if(sync_timer%g_com_map[COM_INTERVAL]==0)
      {
@@ -122,7 +104,6 @@
void SysTick_Handler(void)
{
   
}
/** 
@@ -136,7 +117,16 @@
  }   
}
u8 needanchorrx=1;
void EXTI0_IRQHandler(void)
{
  if(EXTI_GetITStatus(EXTI_Line0)!= RESET)
  {
    EXTI_ClearITPendingBit(EXTI_Line0);
    Anchor_App();
    needanchorrx = 1;
  }
}
void USART1_IRQHandler(void)
{
  if(USART_GetITStatus(EXT_UART, USART_IT_RXNE) != RESET)//?????????